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

如果绑定元素可以生成类型为 trueIChannelListener<TChannel>,则为 TChannel;否则为 false

适用于