Compartir a través de


BinaryMessageEncodingBindingElement.BuildChannelListener<TChannel> Método

Definición

Compila el agente de escucha del canal en el servicio que acepta un tipo especificado de canal para un contexto especificado.

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)

Parámetros de tipo

TChannel

Tipo de canal que acepta el agente de escucha del canal.

Parámetros

context
BindingContext

BindingContext para el agente de escucha.

Devoluciones

IChannelListener<TChannel> de tipo TChannel para el contexto especificado.

Ejemplos

var binding2 = new CustomBinding();
var bpCol2 = new BindingParameterCollection();
var context2 = new BindingContext(binding2, bpCol2);
be.BuildChannelListener<IDuplexChannel>(context2);
Dim binding2 As New CustomBinding()
Dim bpCol2 As New BindingParameterCollection()
Dim context2 As New BindingContext(binding2, bpCol2)
be.BuildChannelListener(Of IDuplexChannel)(context2)

Se aplica a