Squared.Task.IO.DiskMonitor.Dispose C# (CSharp) Method

Dispose() public method

public Dispose ( ) : void
return void
        public void Dispose()
        {
            if (_Watchers != null) {
                foreach (var watcher in _Watchers) {
                    watcher.EnableRaisingEvents = false;
                    watcher.Dispose();
                }

                _Watchers = null;
            }
        }

Usage Example

Example #1
0
        public void TearDown()
        {
            Monitor.Dispose();
            Monitor = null;

            System.IO.Directory.Delete(TempFolder, true);
        }