private void InitializeExtensionApp(Assembly assembly) { Type extensionAppType = typeof(IExtensionApplication); Type assemblyAttribute = typeof(Autodesk.DesignScript.Runtime.ExtensionApplicationAttribute); System.Type appType = CLRDLLModule.GetImplemetationType(assembly, extensionAppType, assemblyAttribute, true); if (null == appType) { return; } IExtensionApplication extesionApp = null; lock (mAssemblies) { if (!mAssemblies.ContainsKey(assembly)) { extesionApp = (IExtensionApplication)Activator.CreateInstance(appType, true); mExtensionApps.Add(appType, extesionApp); } } if (null != extesionApp) { extesionApp.StartUp(); } }
/// <summary> /// For nunit-setup /// </summary> internal void ForceStartUpAllApps() { IDictionaryEnumerator i = mExtensionApps.GetEnumerator(); while (i.MoveNext()) { IExtensionApplication app = i.Value as IExtensionApplication; if (null != app) { app.StartUp(); } } }
/// <summary> /// For nunit-setup /// </summary> internal void ForceStartUpAllApps() { IDictionaryEnumerator i = mExtensionApps.GetEnumerator(); while (i.MoveNext()) { IExtensionApplication app = i.Value as IExtensionApplication; if (null != app) { app.StartUp(new ExtensionStartupParams() { DisableADP = Dynamo.Logging.Analytics.DisableAnalytics }); } } }