Share via


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

戻り値

指定した型のチャネル リスナーを作成できる場合は true。それ以外の場合は false。 既定値は、false です。

例外

contextnull です。

注釈

チャネル リスナーを作成する前にこのメソッドを呼び出す必要があります。

このメソッドは、trueTChannel である場合は IInputChannel を返します。また、バインディング スタック内の現在のバインディングより下のバインディングは IDuplexSessionChannel または IReplyChannel です。

適用対象