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

通道型別。

參數

context
BindingContext

應該用來建置通道接聽程式的 BindingContext

傳回

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

例外狀況

contextnull

無法建置指定通道類型的通道接聽程式。

備註

這個方法會建立接收此繫結之訊息的通道接聽程式。

建置通道時,基礎結構會呼叫這個方法。 只有在實作自訂繫結項目時才應該在程式碼中使用這個方法。

適用於