Пример #1
0
 public Service(PortList portList)
 {
     if (portList == null)
     {
         throw new ArgumentException("Service must have at least one of the following nodes: name, port or portlist instead.");
     }
     this.portList = portList;
 }
Пример #2
0
 public Service(string name, Int32? port, PortList portList, string protocol, SnmpService snmpService, WebService webService, string ident)
     : this(name, port, portList, protocol)
 {
     if ((snmpService != null) && (webService != null))
         throw new ArgumentException("Service can have either SNMPService or WebService node.");
     this.snmpService = snmpService;
     this.webService = webService;
     this.ident = string.IsNullOrEmpty(ident) ? "0" : ident;
 }
Пример #3
0
 public Service(string name, Int32?port, PortList portList, string protocol, SnmpService snmpService, WebService webService, string ident)
     : this(name, port, portList, protocol)
 {
     if ((snmpService != null) && (webService != null))
     {
         throw new ArgumentException("Service can have either SNMPService or WebService node.");
     }
     this.snmpService = snmpService;
     this.webService  = webService;
     this.ident       = string.IsNullOrEmpty(ident) ? "0" : ident;
 }
Пример #4
0
        public Service(string name, Int32? port, PortList portList, string protocol)
        {
            if (string.IsNullOrEmpty(name) && (port == null) && (portList == null))
                throw new ArgumentException("Service must have at least one of the following nodes: name, port or portlist instead.");
            if ((!string.IsNullOrEmpty(name) || (port != null)) && (portList != null))
                throw new ArgumentException("Service must have either: (name and/or port) or portlist node.");

            this.name = name;
            this.port = port;
            this.portList = portList;
            this.protocol = protocol;
        }
Пример #5
0
        public Service(string name, Int32?port, PortList portList, string protocol)
        {
            if (string.IsNullOrEmpty(name) && (port == null) && (portList == null))
            {
                throw new ArgumentException("Service must have at least one of the following nodes: name, port or portlist instead.");
            }
            if ((!string.IsNullOrEmpty(name) || (port != null)) && (portList != null))
            {
                throw new ArgumentException("Service must have either: (name and/or port) or portlist node.");
            }

            this.name     = name;
            this.port     = port;
            this.portList = portList;
            this.protocol = protocol;
        }
Пример #6
0
 public Service(string name, Int32?port, PortList portList, string protocol, WebService webService)
     : this(name, port, portList, protocol)
 {
     this.webService = webService;
 }
Пример #7
0
 public Service(string name, Int32?port, PortList portList, string protocol, SnmpService snmpService)
     : this(name, port, portList, protocol)
 {
     this.snmpService = snmpService;
 }
Пример #8
0
 public Service(string name, Int32? port, PortList portList, string protocol, WebService webService)
     : this(name, port, portList, protocol)
 {
     this.webService = webService;
 }
Пример #9
0
 public Service(string name, Int32? port, PortList portList, string protocol, SnmpService snmpService)
     : this(name, port, portList, protocol)
 {
     this.snmpService = snmpService;
 }
Пример #10
0
 public Service(PortList portList)
 {
     if (portList == null)
         throw new ArgumentException("Service must have at least one of the following nodes: name, port or portlist instead.");
     this.portList = portList;
 }
Пример #11
0
 public AdditionalData(string meaning, PortList data)
 {
     this.meaning  = meaning;
     data_portlist = data;
     type          = ADEnum.portlist;
 }
 public AdditionalData(string meaning, PortList data)
 {
     this.meaning = meaning;
     data_portlist = data;
     type = ADEnum.portlist;
 }