Share via


BinaryMessageEncodingBindingElement.BuildChannelFactory<TChannel> Methode

Definition

Erstellt den Kanalfactorystapel auf dem Client, der einen angegebenen Kanaltyp für einen angegebenen Kontext erstellt.

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)

Typparameter

TChannel

Der Kanaltyp, der von der Kanalfactory erzeugt wird.

Parameter

context
BindingContext

Der BindingContext für den Kanal.

Gibt zurück

Ein IChannelFactory<TChannel> vom Typ TChannel für den angegebenen Kontext.

Beispiele

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)

Gilt für: