Example #1
0
        public virtual bool CanBuildServiceDispatcher <TChannel>(BindingContext context) where TChannel : class, IChannel
        {
            if (context == null)
            {
                throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("context");
            }

            return(context.CanBuildNextServiceDispatcher <TChannel>());
        }
Example #2
0
        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))));
        }
Example #3
0
 internal bool IsUnderlyingDispatcherDuplex <TChannel>(BindingContext context)
 {
     return((typeof(TChannel) == typeof(IDuplexSessionChannel)) && context.CanBuildNextServiceDispatcher <IDuplexChannel>() &&
            !context.CanBuildNextServiceDispatcher <IDuplexSessionChannel>());
 }
Example #4
0
        public virtual bool CanBuildServiceDispatcher <TChannel>(BindingParameterCollection parameters) where TChannel : class, IChannel
        {
            BindingContext context = new BindingContext(new CustomBinding(this), parameters);

            return(context.CanBuildNextServiceDispatcher <TChannel>());
        }