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>(); } }
public bool GetContextStatus(WipeContext context) { Debug.AssertNotNull(context, "Context is null"); return context.GetContextStatus(out _contextStatus); }
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; }