ExcelDna.Integration.SynchronizationManager.Uninstall C# (CSharp) Method

Uninstall() static private method

static private Uninstall ( ) : void
return void
        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;
            }
        }

Usage Example

Example #1
0
        internal void AutoClose()
        {
            UnloadCustomUI();

            foreach (AssemblyLoader.ExcelAddInInfo addIn in _addIns)
            {
                try
                {
                    if (addIn.AutoCloseMethod != null)
                    {
                        addIn.AutoCloseMethod.Invoke(addIn.Instance, null);
                    }
                }
                catch (Exception e)
                {
                    // TODO: What to do here?
                    Debug.WriteLine(e.Message);
                }
            }
            // This is safe, even if never registered
            SynchronizationManager.Uninstall();
            _addIns.Clear();
        }
All Usage Examples Of ExcelDna.Integration.SynchronizationManager::Uninstall
SynchronizationManager