System.Web.HttpRuntime.UnloadAppDomain C# (CSharp) Method

UnloadAppDomain() private method

private UnloadAppDomain ( ) : void
return void
		public static void UnloadAppDomain ()
		{
			//
			// TODO: call ReleaseResources
			//
			domainUnloading = true;
			HttpApplicationFactory.DisableWatchers ();
			ThreadPool.QueueUserWorkItem (delegate {
				try {
					ShutdownAppDomain ();
				} catch (Exception e){
					Console.Error.WriteLine (e);
				}
			});
		}
		//

Usage Example

Example #1
0
 static void SetOfflineMode(bool offline, string filePath)
 {
     if (!offline)
     {
         app_offline_file = null;
         if (HttpApplicationFactory.ApplicationDisabled)
         {
             HttpRuntime.UnloadAppDomain();
         }
     }
     else
     {
         app_offline_file = filePath;
         HttpApplicationFactory.DisableWatchers();
         HttpApplicationFactory.ApplicationDisabled = true;
         InternalCache.InvokePrivateCallbacks();
         HttpApplicationFactory.Dispose();
     }
 }
All Usage Examples Of System.Web.HttpRuntime::UnloadAppDomain