Microsoft.VisualStudio.Project.FileChangeManager.Dispose C# (CSharp) Method

Dispose() public method

Disposes resources.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            // Don't dispose more than once
            if(this.disposed)
            {
                return;
            }

            this.disposed = true;

            // Unsubscribe from the observed source files.
            foreach(ObservedItemInfo info in this.observedItems.Values)
            {
                ErrorHandler.ThrowOnFailure(this.fileChangeService.UnadviseFileChange(info.FileChangeCookie));
            }

            // Clean the observerItems list
            this.observedItems.Clear();
        }

Usage Example

Esempio n. 1
0
 protected override void Dispose(bool disposing)
 {
     ThreadHelper.ThrowIfNotOnUIThread();
     if (filechangemanager != null)
     {
         filechangemanager.Dispose();
         filechangemanager = null;
     }
     base.Dispose(disposing);
 }