Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }
Esempio n. 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;
        }
Esempio n. 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;
        }
Esempio n. 6
0
 public Service(string name, Int32?port, PortList portList, string protocol, WebService webService)
     : this(name, port, portList, protocol)
 {
     this.webService = webService;
 }
Esempio n. 7
0
 public Service(string name, Int32?port, PortList portList, string protocol, SnmpService snmpService)
     : this(name, port, portList, protocol)
 {
     this.snmpService = snmpService;
 }
Esempio n. 8
0
 public Service(string name, Int32? port, PortList portList, string protocol, WebService webService)
     : this(name, port, portList, protocol)
 {
     this.webService = webService;
 }
Esempio n. 9
0
 public Service(string name, Int32? port, PortList portList, string protocol, SnmpService snmpService)
     : this(name, port, portList, protocol)
 {
     this.snmpService = snmpService;
 }
Esempio n. 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;
 }
Esempio n. 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;
 }