Inheritance: ICloneable
Example #1
0
        private void AllocateObjects()
        {
            if(context == null) {
                context = new WipeContext();
            }

            if(searcher == null) {
                searcher = new FileSearcher();
            }

            if(startLock == null) {
                startLock = new object();
            }

            if(startEvent == null) {
                startEvent = new AutoResetEvent(false);
            }

            if(statistics == null) {
                statistics = new WipeStatistics();
            }

            if(_beforeWipeErrors == null) {
                _beforeWipeErrors = new List<WipeError>();
            }

            if(_afterWipeErrors == null) {
                _afterWipeErrors = new List<WipeError>();
            }

            if(_bridgeItems == null) {
                _bridgeItems = new List<IWipeObject>();
            }
        }
Example #2
0
 public object Clone()
 {
     WipeStatistics temp = new WipeStatistics();
     temp._averageWriteSpeed = _averageWriteSpeed;
     temp._bytesInClusterTips = _bytesInClusterTips;
     temp._duration = _duration;
     temp._endTime = _endTime;
     temp._errors = _errors;
     temp._failedObjects = _failedObjects;
     temp._startTime = _startTime;
     temp._totalWipedBytes = _totalWipedBytes;
     return temp;
 }
Example #3
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;
 }