/// <summary>
        /// Cleans up the plug-in app domain so that the plug-in dll files can be edited after unloading
        /// </summary>
        public static void Teardown()
        {
            // Run code on new app-domain to tear down
            if (UseDetachedAppDomain)
            {
                // Tear down
                PluginCrossDomain.Teardown();

                // Log it
                Logger.LogDebugSource($"Unloading cross-domain...");

                // Unload our domain
                AppDomain.Unload(PlugInAppDomain);
            }
            else
            {
                // Tear down SolidWorks references
                AddInIntegration.TearDown();
            }
        }
예제 #2
0
        /// <summary>
        /// Cleans up the plug-in app domain so that the plug-in dll files can be edited after unloading
        /// </summary>
        public static void Teardown()
        {
            // Run code on new app-domain to tear down
            if (UseDetachedAppDomain)
            {
                // Tear down
                PluginCrossDomain.Teardown();

                // Log it
                Logger.LogDebugSource($"Unloading cross-domain...");

                // Unload our domain
                AppDomain.Unload(PlugInAppDomain);
            }
            else
            {
                // Log it
                Logger.LogDebugSource($"Disposing SolidWorks COM reference...");

                // Dispose SolidWorks COM
                AddInIntegration.SolidWorks?.Dispose();
                AddInIntegration.SolidWorks = null;
            }
        }