Unregister() static private method

static private Unregister ( ) : void
return void
コード例 #1
0
ファイル: DnaLibrary.cs プロジェクト: zqwght/ExcelDna
        internal void AutoClose()
        {
            Logger.Initialization.Verbose("DnaLibrary AutoClose");
            UnloadCustomUI();

            foreach (AssemblyLoader.ExcelAddInInfo addIn in _addIns)
            {
                try
                {
                    if (addIn.AutoCloseMethod != null)
                    {
                        addIn.AutoCloseMethod.Invoke(addIn.Instance, null);
                    }
                }
                catch (Exception e)
                {
                    Logger.Initialization.Warn("DnaLibrary AutoClose Error: {0}", e.Message);
                }
            }
            // This is safe, even if never registered
            SynchronizationManager.Uninstall();
            RegistrationInfo.Unregister();
            _addIns.Clear();
        }
コード例 #2
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();
            RegistrationInfo.Unregister();
            _addIns.Clear();
        }