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