Compartilhar via


BinaryMessageEncodingBindingElement.BuildChannelFactory<TChannel> Método

Definição

Cria a pilha de fábrica de canais no cliente que cria um tipo de canal especificado para um contexto especificado.

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

O tipo de canal que a fábrica de canais produz.

Parâmetros

context
BindingContext

O BindingContext do canal.

Retornos

Um IChannelFactory<TChannel> do tipo TChannel para o contexto especificado.

Exemplos

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)

Aplica-se a