Ignore:
Timestamp:
3/15/2008 1:06:38 PM (7 years ago)
Author:
lowjoel
Message:

Replace the Globals static class with the ManagerLibrary? class which is a singleton-like class.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/DirectExecutor.cs

    r276 r280  
    357357            if (method == ErasureMethodManager.Default) 
    358358                method = ErasureMethodManager.GetInstance( 
    359                     Globals.Settings.DefaultUnusedSpaceErasureMethod); 
     359                    ManagerLibrary.Instance.Settings.DefaultUnusedSpaceErasureMethod); 
    360360 
    361361            TaskProgressEventArgs eventArgs = new TaskProgressEventArgs(task, 0, 0); 
     
    419419                    //Then run the erase task 
    420420                    method.Erase(stream, long.MaxValue, 
    421                         PRNGManager.GetInstance(Globals.Settings.ActivePRNG), 
     421                        PRNGManager.GetInstance(ManagerLibrary.Instance.Settings.ActivePRNG), 
    422422                        delegate(long lastWritten, int currentPass) 
    423423                        { 
     
    457457                        //Then run the erase task 
    458458                        method.Erase(strm, long.MaxValue, 
    459                             PRNGManager.GetInstance(Globals.Settings.ActivePRNG), 
     459                            PRNGManager.GetInstance(ManagerLibrary.Instance.Settings.ActivePRNG), 
    460460                            null); 
    461461                    } 
     
    551551                    //Erase the file 
    552552                    method.Erase(stream, long.MaxValue, PRNGManager.GetInstance( 
    553                         Globals.Settings.ActivePRNG), null); 
     553                        ManagerLibrary.Instance.Settings.ActivePRNG), null); 
    554554                } 
    555555                finally 
     
    583583            ErasureMethod method = target.Method; 
    584584            if (method == ErasureMethodManager.Default) 
    585                 method = ErasureMethodManager.GetInstance(Globals.Settings.DefaultFileErasureMethod); 
     585                method = ErasureMethodManager.GetInstance(ManagerLibrary.Instance.Settings.DefaultFileErasureMethod); 
    586586 
    587587            //Calculate the total amount of data required to finish the wipe. This 
     
    634634                         itemTotal = method.CalculateEraseDataSize(null, strm.Length); 
    635635                    method.Erase(strm, long.MaxValue, 
    636                         PRNGManager.GetInstance(Globals.Settings.ActivePRNG), 
     636                        PRNGManager.GetInstance(ManagerLibrary.Instance.Settings.ActivePRNG), 
    637637                        delegate(long lastWritten, int currentPass) 
    638638                        { 
     
    761761        { 
    762762            //Get a random file name 
    763             PRNG prng = PRNGManager.GetInstance(Globals.Settings.ActivePRNG); 
     763            PRNG prng = PRNGManager.GetInstance(ManagerLibrary.Instance.Settings.ActivePRNG); 
    764764            byte[] newFileNameAry = new byte[length]; 
    765765            prng.NextBytes(newFileNameAry); 
Note: See TracChangeset for help on using the changeset viewer.