BindingContext.CanBuildInnerChannelFactory<TChannel> Méthode

Définition

Retourne une valeur qui indique si la fabrication de canal interne peut générer un type spécifié de canal.Returns a value that indicates whether the inner channel factory can produce a specified type of channel.

public:
generic <typename TChannel>
 bool CanBuildInnerChannelFactory();
public bool CanBuildInnerChannelFactory<TChannel> ();
member this.CanBuildInnerChannelFactory : unit -> bool
Public Function CanBuildInnerChannelFactory(Of TChannel) () As Boolean

Paramètres de type

TChannel

Le type d'objets IChannel que la fabrication de canal interne génère.The type of IChannel object the inner channel factory produces.

Retours

true si la fabrication de canal interne peut produire le TChannel spécifié ; sinon, false.true if the inner channel factory can produce the specified TChannel; otherwise, false.

Exemples

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

S’applique à