Ejemplo n.º 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();
            }
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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();
        }
Ejemplo n.º 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);
            }
        }
Ejemplo n.º 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();
 }