src/packages/EmbedIO/Files/FileSystemProvider.cs
/// <summary>
/// Releases unmanaged and - optionally - managed resources.
/// </summary>
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources;
/// <see langword="false"/> to release only unmanaged resources.</param>
Releases unmanaged and - optionally - managed resources.
Releases unmanaged and - optionally - managed resources .
protected virtual void Dispose(bool disposing)
        {
            ResourceChanged = null; 
            if (_watcher != null)
            {
                _watcher.EnableRaisingEvents = false;
                _watcher.Changed -= Watcher_ChangedOrDeleted;
                _watcher.Deleted -= Watcher_ChangedOrDeleted;
                _watcher.Renamed -= Watcher_Renamed;
                if (disposing)
                    _watcher.Dispose();
            }
        }
protected virtual void Dispose ( bool disposing ) { ResourceChanged = null ; if ( _watcher != null ) { _watcher . EnableRaisingEvents = false ; _watcher . Changed -= Watcher_ChangedOrDeleted ; _watcher . Deleted -= Watcher_ChangedOrDeleted ; _watcher . Renamed -= Watcher_Renamed ; if ( disposing ) _watcher . Dispose ( ) ; } }
Releases unmanaged and - optionally - managed resources.
Releases unmanaged and - optionally - managed resources .
// Release references to listeners
disposing
bool
to release both managed and unmanaged resources;
to release only unmanaged resources.
to release both managed and unmanaged resources ; to release only unmanaged resources .