Comparteix a través de


BinaryMessageEncodingBindingElement.BuildChannelFactory<TChannel> Método

Definición

Crea la pila del generador de canales en el cliente que crea un tipo específico de canal, para un contexto determinado.

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)

Parámetros de tipo

TChannel

El tipo de canal que produce el generador de canales.

Parámetros

context
BindingContext

BindingContext para el canal.

Devoluciones

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

Ejemplos

var binding = new CustomBinding();
var bpCol = new BindingParameterCollection();
var context = new BindingContext(binding, bpCol);
be.BuildChannelFactory<IDuplexChannel>(context);
Dim binding As New CustomBinding()
Dim bpCol As New BindingParameterCollection()
Dim context As New BindingContext(binding, bpCol)
be.BuildChannelFactory(Of IDuplexChannel)(context)

Se aplica a