語言

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

那 BindingContext 應該用來建造通道工廠。

傳回

該類型IChannelFactory<TChannel>由 TChannel 初始化。context

例外狀況

context 是 null。

無法為指定通道類型建立通道工廠。

備註

此方法建立通道工廠,可用來製作指定類型的輸出通道。 此方法由基礎設施在建置通道堆疊時呼叫。 你應該只在實作自訂綁定元素時才在程式碼中使用它。

適用於