コード例 #1
0
 public IRequestSender GetSender(string protocol)
 {
     switch (protocol)
     {
         case "http": return httpSender ?? (httpSender = new HttpRequestSender());
         default: throw new NotSupportedException(string.Format("Protocol '{0}' is not supported", protocol));
     }
 }
コード例 #2
0
        public IRequestSender GetSender(string protocol)
        {
            switch (protocol)
            {
            case "http": return(httpSender ?? (httpSender = new HttpRequestSender()));

            default: throw new NotSupportedException(string.Format("Protocol '{0}' is not supported", protocol));
            }
        }