// Called from the Initialize (loading COM /RTD server) and/or from AutoOpen internal static void Install() { Debug.Assert(ExcelDnaUtil.IsMainThread, "SynchronizationManager must be Installed from the main Excel thread."); if (_syncWindow == null) { _syncWindow = new SynchronizationWindow(); } }
internal static void Uninstall() { if (_syncWindow != null) { Logger.Initialization.Info("SynchronizationManager - Uninstall"); Debug.Assert(ExcelDnaUtil.IsMainThread, "SynchronizationManager must be Uninstalled from the main Excel thread."); _syncWindow.Dispose(); _syncWindow = null; } }
// TODO: Check that this does not happen in a 'function' context. internal static void Install() { if (!ExcelDnaUtil.IsMainThread()) { throw new InvalidOperationException("SynchronizationManager must be installed from the main Excel thread. Ensure that ExcelAsyncUtil.Initialize() is called from AutoOpen() or a macro on the main Excel thread."); } if (_syncWindow == null) { _syncWindow = new SynchronizationWindow(); } _installCount++; }
// Called from the Initialize (loading COM /RTD server) and/or from AutoOpen internal static void Install() { if (!ExcelDnaUtil.IsMainThread) { Logger.Initialization.Error("SynchronizationManager must be Installed from the main Excel thread."); return; } if (_syncWindow == null) { Logger.Initialization.Info("SynchronizationManager - Install"); _syncWindow = new SynchronizationWindow(); } }
internal static void Uninstall() { if (!ExcelDnaUtil.IsMainThread()) { throw new InvalidOperationException("SynchronizationManager must be uninstalled from the main Excel thread. Ensure that ExcelAsyncUtil.Uninitialize() is called from AutoOpen() or a macro on the main Excel thread."); } _installCount--; if (_installCount == 0 && _syncWindow != null) { _syncWindow.Dispose(); _syncWindow = null; } }
// Called from the Initialize (loading COM /RTD server) and/or from AutoOpen internal static void Install(bool isAutoOpen) { if (!ExcelDnaUtil.IsMainThread) { Logger.Initialization.Error("SynchronizationManager must be Installed from the main Excel thread."); return; } if (_syncWindow == null) { Logger.Initialization.Info("SynchronizationManager - Install"); _syncWindow = new SynchronizationWindow(); } if (isAutoOpen) { // Safe to call more than once _syncWindow.Register(); } }
public RunMacroSynchronization(SynchronizationWindow syncWindow) { _syncWindow = syncWindow; Register(); }
public RtdUpdateSynchronization(SynchronizationWindow syncWindow) { _syncWindow = syncWindow; }
internal static void Install() { if (!ExcelDnaUtil.IsMainThread()) { throw new InvalidOperationException("SynchronizationManager must be installed from the main Excel thread. Ensure that ExcelAsyncUtil.Initialize() is called from AutoOpen() or a macro on the main Excel thread."); } if (_syncWindow == null) { _syncWindow = new SynchronizationWindow(); } _installCount++; }
public RunMacroSynchronization(SynchronizationWindow syncWindow) { _syncWindow = syncWindow; }
internal static void Uninstall() { Debug.Assert(ExcelDnaUtil.IsMainThread, "SynchronizationManager must be Uninstalled from the main Excel thread."); _syncWindow.Dispose(); _syncWindow = null; }