public HttpWebRequestHandlerUnitTest()
 {
     httpWebRequestHandler = new HttpWebRequestHandler(new HttpWebRequestConfiguration()
     {
         KeepAlive = false, UserAgent = "UnitTest"
     });
 }
コード例 #2
0
        public HttpWebRequestInterceptor(IHttpWebRequestHandler httpWebRequestHandler)
        {
            handler = httpWebRequestHandler;
            try
            {
                // This flag makes sure we only do this once. Even if we failed to initialize in an
                // earlier time, we should not retry because this initialization is not cheap and
                // the likelihood it will succeed the second time is very small.
                //this.initialized = true;

                PrepareReflectionObjects();
                PerformInjection();
            }
            catch (Exception ex)
            {
                // If anything went wrong, just no-op. Write an event so at least we can find out.

                //this.Write(InitializationFailed, new { Exception = ex });
                throw;
            }
        }
コード例 #3
0
 public ConnectionArrayList(ArrayList list, ServicePointContext servicePointContext, IHttpWebRequestHandler httpHandler)
     : base(list)
 {
     context = servicePointContext;
     handler = httpHandler;
 }
コード例 #4
0
 public ConnectionGroupHashtable(Hashtable table, ServicePointContext servicePointContext, IHttpWebRequestHandler httpHandler)
     : base(table)
 {
     this.context = servicePointContext;
     handler      = httpHandler;
 }
コード例 #5
0
 public Msg91(Msg91BulkSmsServiceConfiguration msg91ServiceConfiguration, IHttpWebRequestHandler httpWebRequestHandler)
 {
     _msg91ServiceConfiguration = msg91ServiceConfiguration;
     _httpWebRequestHandler     = httpWebRequestHandler;
 }
コード例 #6
0
 public HttpWebRequestArrayList(ArrayList list, IHttpWebRequestHandler handler)
     : base(list)
 {
     this.handler = handler;
 }