protected override void Dispose(bool disposing) { try { this.UnRegisterDebuggerEvents(); if (null != _libraryManager) { _libraryManager.Dispose(); _libraryManager = null; } if (_oleComponentManager != null) { ThreadHelper.JoinableTaskFactory.Run(async delegate { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); _oleComponentManager.FRevokeComponent(m_componentID); }); _oleComponentManager = null; } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { try { _mySolutionListener.Dispose(); if (_componentID != 0) { IOleComponentManager mgr = GetIOleComponentManager(); mgr.FRevokeComponent(_componentID); _componentID = 0; } if (_libraryManager != null) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
protected override void OnClose() { // unhook from Undo related services if (_undoManager != null) { IVsLinkCapableUndoManager linkCapableUndoMgr = (IVsLinkCapableUndoManager)_undoManager; if (linkCapableUndoMgr != null) { linkCapableUndoMgr.UnadviseLinkedUndoClient(); } // Throw away the undo stack etc. // It is important to “zombify†the undo manager when the owning object is shutting down. // This is done by calling IVsLifetimeControlledObject.SeverReferencesToOwner on the undoManager. // This call will clear the undo and redo stacks. This is particularly important to do if // your undo units hold references back to your object. It is also important if you use // "mdtStrict" linked undo transactions as this sample does (see IVsLinkedUndoTransactionManager). // When one object involved in linked undo transactions clears its undo/redo stacks, then // the stacks of the other documents involved in the linked transaction will also be cleared. IVsLifetimeControlledObject lco = (IVsLifetimeControlledObject)_undoManager; lco.SeverReferencesToOwner(); _undoManager = null; } IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; mgr?.FRevokeComponent(_componentId); Dispose(true); base.OnClose(); }
public void UnRegisterForIdleTimeCallbacks() { if (_cmService != null) { _cmService.FRevokeComponent(_wComponentID); } }
public int FDoIdle(uint grfidlef) { bool bPeriodic = (grfidlef & (uint)_OLEIDLEF.oleidlefPeriodic) != 0; IOleComponentManager cmpMgr = (IOleComponentManager)Package.GetGlobalService(typeof(SOleComponentManager)); if (bPeriodic && cmpMgr != null) { //var changes = FileUtilities.Instance.getCurrentTextSnapShot().Version.Changes; ////var changes = FileUtilities.Instance.GetIWpfTextView((string)document).TextSnapshot.Version.Changes; //if (changes != null) //{ // StaDynParser parser = new StaDynParser(); // parser.parseAll(); // SourceHelper.refreshHighlighting(); //} Trace.WriteLine("Entering timer"); StaDynParser parser = new StaDynParser(); parser.parseAll(); SourceHelper.refreshHighlighting(); cmpMgr.FRevokeComponent(m_componentID); } return(0); }
protected override void Dispose(bool disposing) { if (disposing) { _languageService.Dispose(); _languageService = null; } try { if (_componentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { mgr.FRevokeComponent(_componentID); } _componentID = 0; } } finally { base.Dispose(disposing); } }
public void Dispose() { if (_compId != VSConstants.VSCOOKIE_NIL) { _compMgr.FRevokeComponent(_compId); _compId = VSConstants.VSCOOKIE_NIL; } }
protected override void Dispose(bool disposing) { if ((int)this.m_componentID != 0) { IOleComponentManager service = this.GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (service != null) { service.FRevokeComponent(this.m_componentID); } this.m_componentID = 0U; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { if (m_ComponentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { int hr = mgr.FRevokeComponent(m_ComponentID); } m_ComponentID = 0; } base.Dispose(disposing); }
} // proc Initialize protected override void Dispose(bool disposing) { if (languageTimerComponent != 0) { IOleComponentManager mgr = this.GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { mgr.FRevokeComponent(languageTimerComponent); } languageTimerComponent = 0; } base.Dispose(disposing); } // proc Dispose
internal void Unregister() { if (this.IsComponent) { using (lockObject.Lock()) { var hr = oleComponentManager.FRevokeComponent(componentId); if (ErrorHandler.Failed(hr)) { Marshal.ThrowExceptionForHR(hr); } } } }
protected override void Dispose(bool disposing) { // Unload build monitor pipe domain if (buildMonitorDomain != null) AppDomain.Unload(buildMonitorDomain); if (m_componentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { int hr = mgr.FRevokeComponent(m_componentID); } m_componentID = 0; } base.Dispose(disposing); }
protected override void Dispose(bool disposing) { _uiThread.MustBeCalledFromUIThreadOrThrow(); try { if (_componentID != 0) { _compMgr.FRevokeComponent(_componentID); _componentID = 0; } if (_libraryManager != null) { _libraryManager.Dispose(); _libraryManager = null; } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { try { if (componentID != 0) { IOleComponentManager mgr = GetService(typeof(SOleComponentManager)) as IOleComponentManager; if (mgr != null) { mgr.FRevokeComponent(componentID); } componentID = 0; } if (null != libraryManager) { libraryManager.Dispose(); libraryManager = null; } } finally { base.Dispose(disposing); } }