상속: ICloneable
예제 #1
0
        public object Clone()
        {
            WipeOptions temp = new WipeOptions();
            temp._defaultFileMethod = _defaultFileMethod;
            temp._defaultFreeSpaceMethod = _defaultFreeSpaceMethod;
            temp._destroyFreeSpaceFiles = _destroyFreeSpaceFiles;

            if(_pluginDirectory != null) {
                temp._pluginDirectory = (string)_pluginDirectory.Clone();
            }

            if(_randomOptions != null) {
                temp._randomOptions = (RandomOptions)_randomOptions.Clone();
            }

            temp._totalDelete = _totalDelete;
            temp._wipeAds = _wipeAds;
            temp._wipeFileName = _wipeFileName;

            if(_wipeMethodsPath != null) {
                temp._wipeMethodsPath = (string)_wipeMethodsPath.Clone();
            }

            temp._wipeUnusedFileRecord = _wipeUnusedFileRecord;
            temp._wipeUnusedIndexRecord = _wipeUnusedIndexRecord;
            temp._wipeUsedFileRecord = _wipeUsedFileRecord;
            temp._wipeUsedIndexRecord = _wipeUsedIndexRecord;

            if(_logFilePath != null) {
                temp._logFilePath = (string)_logFilePath.Clone();
            }

            temp._useLogFile = _useLogFile;
            temp._appendToLog = _appendToLog;
            temp._logFileSizeLimit = _logFileSizeLimit;
            return temp;
        }
예제 #2
0
 public WipeSession()
 {
     guid = DefaultSessionGuid;
     items = new List<IWipeObject>();
     context = new WipeContext();
     options = new WipeOptions();
     searcher = new FileSearcher();
     startLock = new object();
     startEvent = new AutoResetEvent(false);
     statistics = new WipeStatistics();
     _beforeWipeErrors = new List<WipeError>();
     _afterWipeErrors = new List<WipeError>();
     _bridgeItems = new List<IWipeObject>();
     endStartCalled = true;
     status = SessionStatus.Stopped;
 }