public IPSecurity Add(bool enabled, string description, ServiceKind service, IPSecurityAction action, IPAddress startIP, IPAddress endIP) { string text = Guid.NewGuid().ToString(); this.m_pVirtualServer.Server.TCP_Client.TcpStream.WriteLine(string.Concat(new object[] { "AddIPSecurityEntry ", this.m_pVirtualServer.VirtualServerID, " ", TextUtils.QuoteString(text), " ", enabled, " ", TextUtils.QuoteString(description), " ", (int)service, " ", (int)action, " ", TextUtils.QuoteString(startIP.ToString()), " ", TextUtils.QuoteString(endIP.ToString()) })); string text2 = this.m_pVirtualServer.Server.ReadLine(); if (!text2.ToUpper().StartsWith("+OK")) { throw new Exception(text2); } IPSecurity iPSecurity = new IPSecurity(this, text, enabled, description, service, action, startIP, endIP); this.m_pEntries.Add(iPSecurity); return(iPSecurity); }
internal IPSecurity(IPSecurityCollection owner, string id, bool enabled, string description, ServiceKind service, IPSecurityAction action, IPAddress startIP, IPAddress endIP) { this.m_pOwner = owner; this.m_ID = id; this.m_Enabled = enabled; this.m_Description = description; this.m_Service = service; this.m_Action = action; this.m_pStartIP = startIP; this.m_pEndIP = endIP; }