Edit

Share via


BindingContext.CanBuildInnerChannelFactory<TChannel> Method

Definition

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

Type Parameters

TChannel

The type of IChannel object the inner channel factory produces.

Returns

true if the inner channel factory can produce the specified TChannel; otherwise, false.

Examples

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)()

Applies to