/// <summary> /// /// </summary> /// <param name="WebVirtualDir"></param> public void Remove(IISWebVirtualDir WebVirtualDir) { for (int i = 0; i < this.List.Count; i++) { if ((IISWebVirtualDir)this.List[i] == WebVirtualDir) { this.List.RemoveAt(i); IISManagement.RemoveIISWebVirtualDir(WebVirtualDir); return; } } }
/// <summary> /// /// </summary> /// <param name="WebServer"></param> public void Remove(IISWebServer WebServer) { for (int i = 0; i < this.List.Count; i++) { if ((IISWebServer)this.List[i] == WebServer) { this.List.RemoveAt(i); return; } } IISManagement.RemoveIISWebServer(WebServer.index); }
/// <summary> /// /// </summary> /// <param name="WebServer"></param> public void Add(IISWebServer WebServer) { try { this.List.Add(WebServer); IISManagement.CreateIISWebServer(WebServer); } catch { throw(new Exception("发生意外错误,可能是某节点将该节点的上级节点作为它自己的子级插入")); } }
/// <summary> /// /// </summary> /// <param name="WebVirtualDir"></param> public void Add(IISWebVirtualDir WebVirtualDir) { WebVirtualDir.Parent = this.Parent; try { this.List.Add(WebVirtualDir); } catch { throw(new Exception("发生意外错误,可能是某节点将该节点的上级节点作为它自己的子级插入")); } IISManagement.CreateIISWebVirtualDir(WebVirtualDir, true); }
/// <summary> /// 把基本信息的更改更新到IIS /// </summary> public void CommitChanges() { IISManagement.EditIISWebServer(this); }