public virtual bool CanBuildServiceDispatcher <TChannel>(BindingContext context) where TChannel : class, IChannel { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context"); } return(context.CanBuildNextServiceDispatcher <TChannel>()); }
public override bool CanBuildServiceDispatcher <TChannel>(BindingContext context) { if (context == null) { throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull(nameof(context)); } // InternalDuplexBindingElement.AddDuplexListenerSupport(context, ref this.internalDuplexBindingElement); // if (this.SessionMode) // { // return this.CanBuildSessionChannelListener<TChannel>(context); // } if (!context.CanBuildNextServiceDispatcher <TChannel>()) { return(false); } return(typeof(TChannel) == typeof(IInputChannel) || typeof(TChannel) == typeof(IInputSessionChannel) || (SupportsDuplex && (typeof(TChannel) == typeof(IDuplexChannel) || typeof(TChannel) == typeof(IDuplexSessionChannel))) || (SupportsRequestReply && (typeof(TChannel) == typeof(IReplyChannel) || typeof(TChannel) == typeof(IReplySessionChannel)))); }
internal bool IsUnderlyingDispatcherDuplex <TChannel>(BindingContext context) { return((typeof(TChannel) == typeof(IDuplexSessionChannel)) && context.CanBuildNextServiceDispatcher <IDuplexChannel>() && !context.CanBuildNextServiceDispatcher <IDuplexSessionChannel>()); }
public virtual bool CanBuildServiceDispatcher <TChannel>(BindingParameterCollection parameters) where TChannel : class, IChannel { BindingContext context = new BindingContext(new CustomBinding(this), parameters); return(context.CanBuildNextServiceDispatcher <TChannel>()); }