void reloadApp() { Console.Error.WriteLine("Nginx Mono Host is Loading the Application"); lock (AppLoadingLock) { if (watchers != null) { foreach (var watcher in watchers) { watcher.EnableRaisingEvents = false; watcher.Dispose(); } } if (AppInstance != null) { try { Console.Error.WriteLine("Nginx Mono Host is Unloading existing HostManager"); AppInstance.Unload(); } finally { AppInstance = null; } } try { string appDir = appFolder; Console.Error.WriteLine("Nginx Mono Host running at '{0}' is Loading new HostManager for directory '{1}'", Environment.CurrentDirectory, appDir); AppInstance = NginxBlackHostManager.LoadApplication <NginxBlackHostManager>(appDir); }finally { initWatchers(); } } }
void reloadApp () { Console.Error.WriteLine ("Nginx Mono Host is Loading the Application"); lock (AppLoadingLock) { if (watchers != null) { foreach (var watcher in watchers) { watcher.EnableRaisingEvents = false; watcher.Dispose (); } } if (AppInstance != null) { try { Console.Error.WriteLine ("Nginx Mono Host is Unloading existing HostManager"); AppInstance.Unload (); } finally { AppInstance = null; } } try { string appDir = appFolder; Console.Error.WriteLine ("Nginx Mono Host running at '{0}' is Loading new HostManager for directory '{1}'",Environment.CurrentDirectory,appDir); AppInstance = NginxBlackHostManager.LoadApplication<NginxBlackHostManager>(appDir); }finally { initWatchers(); } } }