語言

ReliableSessionBindingElement.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 包含建造能生產類型 TChannel通道 的工廠所需的資訊。

傳回

IChannelFactory<TChannel> A 型態IChannel由 context初始化 。

例外狀況

不支援 TChannel。

備註

工廠生產的型號 IChannel 為 TChannel。 用戶端支援的類型 TChannel 取決於連接服務的底層通道類型。 下表顯示根據底層通道支援的可靠會話通道類型。

依底層通道類型支援可靠會話 TChannel 類型 愛爾蘭頻道 IRequestSessionChannel IDuplex頻道 IDuplexSessionChannel
IOutputSessionChannel Yes Yes Yes Yes
IRequestSessionChannel Yes Yes No No
IDuplexSessionChannel No No Yes Yes

適用於