Beispiel #1
0
 public Builder()
 {
     context = new HttpProxyContext()
     {
         HttpMethod  = HttpMethod.GET,
         ContentType = "application/json",
         TimeOut     = -1,
         Filters     = new List <ProxyFilterAttribute>()
     };
 }
        private HttpProxyRequestContext(HttpProxyContext proxyContext, object[] values, object client)
        {
            MethodInfo = proxyContext.MethodInfo;

            ///TODO:Clone
            Url         = proxyContext.Url.Clone();
            HttpMethod  = proxyContext.HttpMethod;
            ContentType = proxyContext.ContentType;
            Accept      = proxyContext.Accept;
            TimeOut     = proxyContext.TimeOut;
            Client      = client;

            this.Handler = new DefaultHttpHandler();

            Arguments = new List <HttpArgument>();
            for (int i = 0; i < values.Length; i++)
            {
                Arguments.Add(new HttpArgument(proxyContext.Arguments[i], values[i]));
            }
        }
 public Builder(HttpProxyContext proxyContext, object[] values, object client)
 {
     context = new HttpProxyRequestContext(proxyContext, values, client);
 }