System.Web.HttpApplicationFactory.EnableWatcherEvents C# (CSharp) Method

EnableWatcherEvents() static private method

static private EnableWatcherEvents ( string virtualPath, string filter, bool enable ) : void
virtualPath string
filter string
enable bool
return void
		static void EnableWatcherEvents (string virtualPath, string filter, bool enable)
		{
			lock (watchers_lock) {
				foreach (FileSystemWatcher watcher in watchers) {
					if (String.Compare (watcher.Path, virtualPath, StringComparison.Ordinal) != 0 || String.Compare (watcher.Filter, filter, StringComparison.Ordinal) != 0)
						continue;
					
					watcher.EnableRaisingEvents = enable;
				}
			}
		}