// Only called for the Root DnaLibrary. internal void AutoOpen() { // Register special RegistrationInfo function RegistrationInfo.Register(); SynchronizationManager.Install(true); // Register my Methods - should this also go into the delayed call? ExcelIntegration.RegisterMethods(_methods); // We defer the rest of the load until we have an Application object... ExcelAsyncUtil.QueueAsMacro(AutoOpenImpl); }
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(); }
// Public function to get registration info for this or other Excel-DNA .xlls // Return null if the matching RegistrationInfo function is not found. public static object GetRegistrationInfo(string xllPath, double registrationUpdateVersion) { return(RegistrationInfo.GetRegistrationInfo(xllPath, registrationUpdateVersion)); }