Bagikan melalui


BinaryMessageEncodingBindingElement.BuildChannelFactory<TChannel> Metode

Definisi

Membangun tumpukan pabrik saluran pada klien yang membuat jenis saluran tertentu untuk konteks tertentu.

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)

Jenis parameter

TChannel

Jenis saluran yang dihasilkan pabrik saluran.

Parameter

context
BindingContext

Untuk BindingContext saluran.

Mengembalikan

IChannelFactory<TChannel> Jenis TChannel untuk konteks yang ditentukan.

Contoh

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)

Berlaku untuk