public override bool CanBuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } IAnonymousUriPrefixMatcher anonymousUriPrefixMatcher = context.GetInnerProperty <IAnonymousUriPrefixMatcher>(); if (anonymousUriPrefixMatcher == null) { return(false); } MessageVersion message = context.GetInnerProperty <MessageVersion>(); if (message.Addressing == AddressingVersion.None) { return(false); } if (typeof(TChannel) == typeof(IDuplexChannel)) { return(context.CanBuildInnerChannelListener <IReplyChannel>()); } if (typeof(TChannel) == typeof(IDuplexSessionChannel)) { return(context.CanBuildInnerChannelListener <IReplySessionChannel>()); } return(false); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { VerifyEncodingMessageVersion(context); if (typeof(IInputChannel) == typeof(TChannel) && this.httpAcknowledgementSettings.Enabled) { return(context.CanBuildInnerChannelListener <IReplyChannel>()); } else { return(context.CanBuildInnerChannelListener <TChannel>()); } }
public override bool CanBuildChannelListener<TChannel>(BindingContext context) { if (context == null) throw new ArgumentNullException("context"); context.BindingParameters.Add(this); return context.CanBuildInnerChannelListener<TChannel>(); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } return(context.CanBuildInnerChannelListener <TChannel>()); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { Utility.IfNullThrowNullArgumentException(context, "context"); if (typeof(TChannel) == typeof(IDuplexChannel)) { return(context.CanBuildInnerChannelListener <TChannel>()); } return(false); }
void Snippet12() { // <Snippet12> CustomBinding binding = new CustomBinding(); BindingParameterCollection bpCol = new BindingParameterCollection(); BindingContext context = new BindingContext(binding, bpCol); context.CanBuildInnerChannelListener <IDuplexChannel>(); // </Snippet12> }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw Error.ArgumentNull("context"); } context.BindingParameters.Add(this); return(IsChannelShapeSupported <TChannel>() && context.CanBuildInnerChannelListener <TChannel>()); }
/// <summary> /// Used by the higher layers to determine what types of channel listeners this /// binding element supports. /// </summary> public override bool CanBuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } if (IsBindingHttp(context.Binding) && typeof(TChannel) == typeof(IReplySessionChannel) && context.CanBuildInnerChannelListener <IReplyChannel>()) { return(true); } return(false); }
public override IChannelListener <TChannel> BuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw new ArgumentNullException("context"); } ThrowIfNotHttpTransport(context.Binding); if (typeof(TChannel) != typeof(IReplySessionChannel)) { throw new ArgumentException("HttpCookieSessionBindingElement only supports IReplySessionChannel Listeners.", "TChannel"); } if (!context.CanBuildInnerChannelListener <IReplyChannel>()) { throw new InvalidOperationException( "HttpCookieSessionBindingElement must be stacked on top of a channel that supports IReplyChannel Listeners."); } return((IChannelListener <TChannel>)(object) new HttpCookieReplySessionChannelListener(this, context)); }
/// <summary> /// Returns a value that indicates whether the binding element can build a channel /// listener for a specific type of channel /// </summary> /// <typeparam name="TChannel">channel to build</typeparam> /// <param name="context">The System.ServiceModel.Channels.BindingContext that provides context for /// the binding element</param> /// <returns>true if the System.ServiceModel.Channels.IChannelFactory<TChannel> of type /// TChannel can be built by the binding element; otherwise, false</returns> public override bool CanBuildChannelListener <TChannel>(BindingContext context) { return(context.CanBuildInnerChannelListener <TChannel>()); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { context.BindingParameters.Add(this); return(context.CanBuildInnerChannelListener <TChannel>()); }
public override bool CanBuildChannelListener <T> (BindingContext ctx) { return(ctx.CanBuildInnerChannelListener <T> ()); }
public override bool CanBuildChannelListener <TChannel>( BindingContext context) { ValidateTransport(context.Binding); return(context.CanBuildInnerChannelListener <TChannel>()); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { if (context == null) { throw Fx.Exception.ArgumentNull("context"); } return(HttpMessageHandlerBindingElement.IsChannelShapeSupported <TChannel>() && context.CanBuildInnerChannelListener <TChannel>()); }
public override Boolean CanBuildChannelListener <TChannel>(BindingContext context) { return(context.CanBuildInnerChannelListener <TChannel>()); //return inner.CanBuildChannelFactory<TChannel>(context); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { return(context.CanBuildInnerChannelListener <IReplyChannel>() || (context.CanBuildInnerChannelListener <IReplySessionChannel>())); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) where TChannel : class, IChannel { return(context.CanBuildInnerChannelListener <TChannel>()); }
public override bool CanBuildChannelListener <TChannel>(BindingContext context) { return(typeof(TChannel) == typeof(IDuplexSessionChannel) && context.CanBuildInnerChannelListener <TChannel>()); }