ReliableSessionBindingElement.BuildChannelListener<TChannel> 方法

定義

傳回接聽程式,此接聽程式會接受支援可靠工作階段之指定型別的通道。

public:
generic <typename TChannel>
 where TChannel : class, System::ServiceModel::Channels::IChannel override System::ServiceModel::Channels::IChannelListener<TChannel> ^ BuildChannelListener(System::ServiceModel::Channels::BindingContext ^ context);
public override System.ServiceModel.Channels.IChannelListener<TChannel> BuildChannelListener<TChannel> (System.ServiceModel.Channels.BindingContext context) where TChannel : class, System.ServiceModel.Channels.IChannel;
override this.BuildChannelListener : System.ServiceModel.Channels.BindingContext -> System.ServiceModel.Channels.IChannelListener<'Channel (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)> (requires 'Channel : null and 'Channel :> System.ServiceModel.Channels.IChannel)
Public Overrides Function BuildChannelListener(Of TChannel As {Class, IChannel}) (context As BindingContext) As IChannelListener(Of TChannel)

類型參數

TChannel

已建置接聽程式要接受的 IChannel

參數

context
BindingContext

BindingContext,其中包含建置可接受 TChannel 型別通道之接聽程式時的必要資訊。

傳回

IChannelListener<TChannel>

IChannelListener<TChannel> 型別的 IChannel,初始化自 context

例外狀況

不支援 TChannel

備註

接聽程式接受的 IChannel 屬於型別 TChannel。 裝載服務之伺服器上支援的 TChannel 型別與用於連接至用戶端之基礎通道型別相依。 下表指出支援提供基礎通道功能的可靠工作階段通道型別。

基礎通道型別支援的可靠工作階段 TChannel 型別 IReplyChannel IReplySessionChannel IDuplexChannel IDuplexSessionChannel
IInputSessionChannel
IReplySessionChannel
IDuplexSessionChannel

適用於