public BasicAuthenticationChannel(HttpMessageChannel inner, Func<string, Tuple<string, string>> getCredentials, 
     HttpMessageChannel channel)
     : base(inner, "Basic")
 {
     _getCredentials = getCredentials;
     _channel = channel;
 }
Example #2
0
        protected DelegatingChannel(HttpMessageChannel innerChannel)
        {
            if (innerChannel == null)
            {
                throw new ArgumentNullException("innerChannel");
            }

            this.innerChannel = innerChannel;
        }
Example #3
0
        protected DelegatingChannel(HttpMessageChannel innerChannel)
        {
            if (innerChannel == null)
            {
                throw new ArgumentNullException("innerChannel");
            }

            this.innerChannel = innerChannel;
        }
 public ValidConstructorHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 public SampleMessageHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 public MockValidMessageHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
Example #7
0
 public TestHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
     DisposeHandlerTests.handlerList.Add(this);
 }
Example #8
0
 protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel)
 {
     return null;
 }
 protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel)
 {
     return base.OnCreate(new AuthenticationChannel(innerChannel));
 }
 public HttpMessageInspector(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 public HttpHostConfiguration SetChannel(HttpMessageChannel channel)
 {
     this.Channel = channel;
     return this;
 }
 public MockInvalidMessageHandler(HttpMessageChannel innerChannel, bool test)
     : base(innerChannel)
 {
 }
 protected MessageProcessingChannel(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 protected AuthenticationChannel(HttpMessageChannel inner, string scheme)
     : base(inner)
 {
     Scheme = scheme;
 }
			protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel)
			{
				HttpMessageChannel channel = new HttpQueryMessageHandler(innerChannel, this.queryLimit);

				if (this.innerFactory != null)
					channel = this.innerFactory.Create(channel);

				return channel;
			}
				public HttpQueryMessageHandler(HttpMessageChannel inner, int queryLimit)
					: base(inner)
				{
					this.queryLimit = queryLimit;
				}
        /// <summary>
        /// Creates an instance of an <see cref="HttpMessageChannel"/> using the HTTP message handlers
        /// provided in the constructor.
        /// </summary>
        /// <param name="innerChannel">The inner channel represents the destination of the HTTP message channel.</param>
        /// <returns>The HTTP message channel.</returns>
        public HttpMessageChannel Create(HttpMessageChannel innerChannel)
        {
            if (innerChannel == null)
            {
                throw Fx.Exception.ArgumentNull("innerChannel");
            }

            return this.OnCreate(innerChannel);
        }
Example #18
0
 public TestHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
     throw new Exception("Handler constructor failure");
 }
        /// <summary>
        /// Creates an instance of an <see cref="HttpMessageChannel"/> using the HTTP message handlers
        /// provided in the constructor.
        /// </summary>
        /// <param name="innerChannel">The inner channel represents the destination of the HTTP message channel.</param>
        /// <returns>The HTTP message channel.</returns>
        protected virtual HttpMessageChannel OnCreate(HttpMessageChannel innerChannel)
        {
            if (innerChannel == null)
            {
                throw Fx.Exception.ArgumentNull("innerChannel");
            }

            HttpMessageChannel pipeline = innerChannel;
            try
            {
                foreach (var ctor in this.handlerCtors)
                {
                    pipeline = (DelegatingChannel)ctor.Invoke(new object[] { pipeline });
                }
            }
            catch (TargetInvocationException tie)
            {
                Fx.Exception.AsError(tie.InnerException);
                throw;
            }

            return pipeline;
        }
Example #20
0
 public TestHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
Example #21
0
		public TracingChannel(HttpMessageChannel handler)
			: base(handler)
		{
		}
 protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel)
 {
     return this.create(innerChannel);
 }
 public AuthenticationChannel(HttpMessageChannel innerChannel)
     : this(innerChannel, new BasicAuthenticator())
 {
 }
 public AuthenticationChannel(HttpMessageChannel innerChannel, IAuthenticator authenticator)
     : base(innerChannel)
 {
     this.authenticator = authenticator;
 }
 public UriFormatExtensionMessageChannel(HttpMessageChannel handler)
     :base(handler)
 {
 }
Example #26
0
 public LoggingChannel(HttpMessageChannel handler)
     : base(handler)
 {
 }
Example #27
0
 public DummyHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 public PostStatusCodeMessageHandler(HttpMessageChannel innerChannel)
     : base(innerChannel)
 {
 }
 public InvalidConstructorHandler(HttpMessageChannel innerChannel, bool test)
     : base(innerChannel)
 {
 }