public override int SetSite(Microsoft.VisualStudio.OLE.Interop.IServiceProvider site) { base.SetSite(site); //Initialize a new object to track project document changes so that we can update the MainFile Property accordingly this.projectDocListenerForMainFileUpdates = new ProjectDocumentsListenerForMainFileUpdates((ServiceProvider)this.Site, this); this.projectDocListenerForMainFileUpdates.Init(); return(VSConstants.S_OK); }
public override int Close() { if (null != this.projectDocListenerForMainFileUpdates) { this.projectDocListenerForMainFileUpdates.Dispose(); this.projectDocListenerForMainFileUpdates = null; } if (null != Site) { IFoxProLibraryManager libraryManager = Site.GetService(typeof(IFoxProLibraryManager)) as IFoxProLibraryManager; if (null != libraryManager) { libraryManager.UnregisterHierarchy(this.InteropSafeHierarchy); } } return(base.Close()); }