コード例 #1
0
        /// <summary>
        /// Call this from Application_End in your Global.asax.cs file. Besides this call, there should be no other code in the method.
        /// </summary>
        public static void CleanUpStatics()
        {
            if (!ewlInitialized)
            {
                return;
            }

            if (!GlobalInitializationOps.SecondaryInitFailed)
            {
                EwfApp.ExecuteWithBasicExceptionHandling(
                    () => {
                    if (appInitializer != null)
                    {
                        appInitializer.CleanUpStatics();
                    }
                },
                    false,
                    false);
            }

            GlobalInitializationOps.CleanUpStatics();

            if (!EwfApp.FrameworkInitialized)
            {
                var waitHandle = new ManualResetEvent(false);
                initFailureUnloadTimer.Dispose(waitHandle);
                waitHandle.WaitOne();
            }
        }
コード例 #2
0
        /// <summary>
        /// Call this from the TearDown method in your NUnit initializer. Besides this call, there should be no other code in the method.
        /// </summary>
        public static void CleanUpStatics()
        {
            if (appInitializer != null)
            {
                appInitializer.CleanUpStatics();
            }

            GlobalInitializationOps.CleanUpStatics();
        }
コード例 #3
0
        /// <summary>
        /// Call this from the TearDown method in your NUnit initializer. Besides this call, there should be no other code in the method.
        /// </summary>
        public static void CleanUpStatics()
        {
            if (appInitializer != null)
            {
                appInitializer.CleanUpStatics();
            }

            AppTools.CleanUp();
        }
コード例 #4
0
        /// <summary>
        /// Performs cleanup activities so the application can be shut down.
        /// </summary>
        public static void CleanUpStatics()
        {
            try {
                globalInitializer?.CleanUpStatics();

                AppMemoryCache.CleanUp();
            }
            catch (Exception e) {
                TelemetryStatics.ReportError("An exception occurred during application cleanup:", e);
            }
        }
コード例 #5
0
 /// <summary>
 /// Call this from Application_Exit. Besides this call, there should be no other code in the method.
 /// </summary>
 public static void CleanUpStatics()
 {
     exceptionHandlerEnabled = false;
     if (!GlobalInitializationOps.SecondaryInitFailed)
     {
         TelemetryStatics.ExecuteBlockWithStandardExceptionHandling(
             () => {
             if (appInitializer != null)
             {
                 appInitializer.CleanUpStatics();
             }
         });
     }
     GlobalInitializationOps.CleanUpStatics();
 }