/// <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); }
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 BasicAuthenticationHandler(HttpMessageChannel innerChannel, IUserValidation userValidation, string realm) : base(innerChannel) { if (userValidation == null) throw new ArgumentNullException("userValidation"); if (string.IsNullOrEmpty(realm)) throw new ArgumentNullException("realm"); this.userValidation = userValidation; this.realm = realm; }
protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel) { if (innerChannel == null) { throw new ArgumentNullException("innerChannel"); } HttpMessageChannel pipeline = innerChannel; foreach (var factory in this.factories) { pipeline = factory(innerChannel); } return pipeline; }
/// <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; }
public InvalidConstructorHandler(HttpMessageChannel innerChannel, bool test) : base(innerChannel) { }
public LoggingChannel(HttpMessageChannel handler) : base(handler) { }
public PostStatusCodeMessageHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public TracingChannel(HttpMessageChannel handler) : base(handler) { }
public StatusKillerMessageHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public TestHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public TestHandler(HttpMessageChannel innerChannel) : base(innerChannel) { throw new Exception("Handler constructor failure"); }
protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel) { return(this.create(innerChannel)); }
public MockValidMessageHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public MockInvalidMessageHandler(HttpMessageChannel innerChannel, bool test) : base(innerChannel) { }
public ValidConstructorHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public HttpHostConfiguration SetChannel(HttpMessageChannel channel) { this.Channel = channel; return(this); }
public HttpQueryMessageHandler(HttpMessageChannel inner, int queryLimit) : base(inner) { this.queryLimit = queryLimit; }
protected override HttpMessageChannel OnCreate(HttpMessageChannel innerChannel) { return(null); }
public BasicAuthenticationHandler(HttpMessageChannel innerChannel) : base(innerChannel) { }
public TestHandler(HttpMessageChannel innerChannel) : base(innerChannel) { DisposeHandlerTests.handlerList.Add(this); }
public UriFormatExtensionMessageChannel(HttpMessageChannel handler) : base(handler) { }