コード例 #1
0
 public override IChannelFactory <TChannel> BuildChannelFactory <TChannel>(BindingContext context)
 {
     if (!this.CanBuildChannelFactory <TChannel>(context))
     {
         throw Microsoft.ServiceBus.Messaging.FxTrace.Exception.Argument("TChannel", SRClient.ChannelTypeNotSupported(typeof(TChannel)));
     }
     return(new RedirectBindingElement.RedirectContainerChannelFactory <TChannel>(context, this));
 }
コード例 #2
0
 public override IChannelListener <TChannel> BuildChannelListener <TChannel>(BindingContext context)
     where TChannel : class, IChannel
 {
     if (!this.CanBuildChannelListener <TChannel>(context))
     {
         throw Microsoft.ServiceBus.Messaging.FxTrace.Exception.Argument("TChannel", SRClient.ChannelTypeNotSupported(typeof(TChannel)));
     }
     if (typeof(TChannel) == typeof(IInputChannel))
     {
         return((IChannelListener <TChannel>)(new ServiceBusInputChannelListener(context, this)));
     }
     return((IChannelListener <TChannel>)(new ServiceBusInputSessionChannelListener(context, this)));
 }