예제 #1
0
        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();
            }
        }
예제 #2
0
        /// <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();
                }
            }
        }
예제 #3
0
        /// <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
                    });
                }
            }
        }