public static Protocol Convert(this V1Protocol value)
        {
            switch (value)
            {
            case V1Protocol.Tcp: return(Protocol.Tcp);

            case V1Protocol.Udp: return(Protocol.Udp);

            default: throw new ArgumentException("Invalid protocol", "protocol");
            }
        }
Beispiel #2
0
        public V1Service(string name, V1Protocol protocol, ushort port, bool isEnabled)
        {
            if (String.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Invalid name", "name");
            }

            m_name = name;
            m_protocol = protocol;
            m_port = port;
            m_isEnabled = isEnabled;
        }
Beispiel #3
0
        public V1Service(string name, V1Protocol protocol, ushort port, bool isEnabled)
        {
            if (String.IsNullOrWhiteSpace(name))
            {
                throw new ArgumentException("Invalid name", "name");
            }

            m_name      = name;
            m_protocol  = protocol;
            m_port      = port;
            m_isEnabled = isEnabled;
        }