CompositeDuplexBindingElement.CanBuildChannelListener<TChannel> 方法

定义

返回一个值,该值指示绑定是否可以生成通道侦听器,且该通道侦听器能够接受符合上下文需要的特定类型的通道。

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override bool CanBuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override bool CanBuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.CanBuildChannelListener : System.ServiceModel.Channels.BindingContext -> bool (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function CanBuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As Boolean

类型参数

TChannel

侦听器接受的 IChannel

参数

context
BindingContext

用于提供生成通道侦听器所需上下文的 BindingContext

返回

如果可以生成接受特定类型通道所需的通道侦听器,则为 true;否则为 false

例外

contextnull

注解

true 如果 TChannel == IInputChannel 和 内部绑定也可以生成 ,则为 IInputChannel;否则为 false

适用于