Share via


SecurityBindingElement.BuildChannelFactory<TChannel> 方法

定義

根據傳入的 SecurityBindingElement 設定和繫結內容建立通道處理站。 所建立的通道處理站是 SOAP 訊息安全性通道處理站,其內部具有對應至繫結內容之通道處理站的參考 (包括傳輸通道處理站)。

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

通道處理站的型別。

參數

傳回

以傳入的 SecurityBindingElement 設定和繫結內容為基礎的通道處理站。

例外狀況

contextnull

不支援 TChannel 型別的通道。

備註

所建立的通道處理站是 SOAP 訊息安全性通道處理站,其內部具有對應至繫結內容之通道處理站的參考 (包括傳輸通道處理站)。

這個方法會執行參數錯誤檢查,然後呼叫 BuildChannelFactoryCore。 該方法在衍生類別中實作時會建立通道處理站,而此通道處理站將用於建立處理此繫結之傳出訊息的通道。

適用於