ConnectionOrientedTransportBindingElement.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

要检查的通道类型。

参数

context
BindingContext

通道的 BindingContext

返回

Boolean

如果可以生成通道侦听器,则为 true;否则为 false

例外

contextnull

注解

在尝试创建通道侦听器之前应调用此方法。

如果 TChannelIDuplexSessionChannel,此方法仅在缓冲模式下返回 true。 如果 TChannelIReplyChannel,此方法仅在流模式下返回 true

适用于