public void NotifyDocumentOfDocumentsComObjectChanged(GraphDocumentEmbeddedComObject documentComObject, GraphDocumentBase oldDocument, GraphDocumentBase newDocument) { if (!(null == oldDocument)) { throw new ArgumentException(nameof(oldDocument) + " should be null"); } if (null == newDocument) { throw new ArgumentNullException(nameof(newDocument)); } _embeddedComObject = documentComObject; EnterEmbeddedObjectMode(); }
private void InternalStopLocalServer() { ComDebug.ReportInfo("Stop local server"); if (null != _embeddedComObject) { _embeddedComObject.Dispose(); _embeddedComObject = null; } foreach (var co in _linkedDocumentsComObjects.Values) { co.Dispose(); } _linkedDocumentsComObjects.Clear(); if (null != _fileComObject) { _fileComObject.Dispose(); _fileComObject = null; } if (null != _classFactoryOfDocumentComObject) { _classFactoryOfDocumentComObject.RevokeClassObject(); ComDebug.ReportInfo("{0}.StopLocalServer:{1} Revoked.", GetType().Name, _classFactoryOfDocumentComObject.GetType().Name); _classFactoryOfDocumentComObject = null; } if (null != _classFactoryOfFileComObject) { _classFactoryOfFileComObject.RevokeClassObject(); ComDebug.ReportInfo("{0}.StopLocalServer:{1} Revoked.", GetType().Name, _classFactoryOfFileComObject.GetType().Name); _classFactoryOfFileComObject = null; } if (null != _garbageCollector) { // Now stop the Garbage Collector thread. _garbageCollector.StopThread(); _garbageCollector.WaitForThreadToStop(); _garbageCollector = null; ComDebug.ReportInfo("StopLocalServer: GarbageCollector thread stopped."); } IsActive = false; }
private void InternalStopLocalServer() { ComDebug.ReportInfo("Stop local server"); if (null != _embeddedComObject) { _embeddedComObject.Dispose(); _embeddedComObject = null; } foreach (var co in _linkedDocumentsComObjects.Values) { co.Dispose(); } _linkedDocumentsComObjects.Clear(); if (null != _fileComObject) { _fileComObject.Dispose(); _fileComObject = null; } if (null != _classFactoryOfDocumentComObject) { _classFactoryOfDocumentComObject.RevokeClassObject(); ComDebug.ReportInfo("{0}.StopLocalServer:{1} Revoked.", this.GetType().Name, _classFactoryOfDocumentComObject.GetType().Name); _classFactoryOfDocumentComObject = null; } if (null != _classFactoryOfFileComObject) { _classFactoryOfFileComObject.RevokeClassObject(); ComDebug.ReportInfo("{0}.StopLocalServer:{1} Revoked.", this.GetType().Name, _classFactoryOfFileComObject.GetType().Name); _classFactoryOfFileComObject = null; } if (null != _garbageCollector) { // Now stop the Garbage Collector thread. _garbageCollector.StopThread(); _garbageCollector.WaitForThreadToStop(); _garbageCollector = null; ComDebug.ReportInfo("StopLocalServer: GarbageCollector thread stopped."); } IsActive = false; }
public void NotifyDocumentOfDocumentsComObjectChanged(GraphDocumentEmbeddedComObject documentComObject, GraphDocumentBase oldDocument, GraphDocumentBase newDocument) { if (!(null == oldDocument)) throw new ArgumentException(nameof(oldDocument) + " should be null"); if (null == newDocument) throw new ArgumentNullException(nameof(newDocument)); _embeddedComObject = documentComObject; EnterEmbeddedObjectMode(); }