共用方式為


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

傳回

IChannelListener,其中包含指定之型別的新通道接聽項。

備註

這個方法可用來取得通道接聽項,以便依據傳輸繫結項目的組態來接收訊息。

適用於