/// <summary> /// 添加监视 WEB 视图服务 /// </summary> /// <param name="server"></param> internal static void Add(ViewServer server) { HashString path = server.WorkPath; VersionFileWatcher watcher; Monitor.Enter(watcherLock); try { if (watchers.TryGetValue(path, out watcher)) { watcher.add(server); } else { watchers.Add(path, new VersionFileWatcher(server)); } } finally { Monitor.Exit(watcherLock); } }