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(); }
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(); }