Exemple #1
0
        private bool ParseInputsArgs()
        {
            if (_config == null)
            {
                return(false);
            }
            string tmp = _config["ProtocolType"];

            if (_protocolInfo.GetJsonAttribute <HttpProtocol>().Contains(tmp))
            {
                _protocol = _config.Get <HttpProtocol>();
                return(true);
            }

            if (_protocolInfo.GetJsonAttribute <TcpProtocol>().Contains(tmp))
            {
                _protocol = _config.Get <TcpProtocol>();
                return(true);
            }

            if (_protocolInfo.GetJsonAttribute <EchoProtocol>().Contains(tmp))
            {
                _protocol = _config.Get <EchoProtocol>();
                return(true);
            }

            return(false);
        }