NamedPipeTransportBindingElement.BuildChannelFactory<TChannel> メソッド

定義

チャネルの作成に使用できる、指定した種類のチャネル ファクトリを作成します。

public:
generic <typename TChannel>
 override System::ServiceModel::Channels::IChannelFactory<TChannel> ^ BuildChannelFactory(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelFactory<TChannel> BuildChannelFactory<TChannel>(System.ServiceModel.Channels.BindingContext context);
override this.BuildChannelFactory : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelFactory<'Channel>
Public Overrides Function BuildChannelFactory(Of TChannel) (context As BindingContext) As IChannelFactory(Of TChannel)

型パラメーター

TChannel

作成するチャネル ファクトリの種類。

パラメーター

context
BindingContext

チャネル ファクトリの作成に必要なバインディング、動作、コントラクト、およびその他の情報を記述するメンバー。

返品

指定した型のチャネル ファクトリを返します。

例外

contextnull は指定できません。

無効な引数が渡されました。

この例では、チャネルの作成に使用できる、指定した種類のチャネル ファクトリを作成する方法を示します。

BindingContext bContext = new BindingContext(customBinding, bpCollection);
IChannelFactory<IOutputChannel> factory =
    binding.BuildChannelFactory<IOutputChannel>(bContext);
Dim bContext As New BindingContext(customBinding, bpCollection)
Dim factory As IChannelFactory(Of IOutputChannel) = binding.BuildChannelFactory(Of IOutputChannel)(bContext)

注釈

このメソッドを使用すると、トランスポート バインド要素の構成に基づいてメッセージを送信するために、指定した種類のチャネル ファクトリを作成できます。

適用対象