BindingContext.CanBuildInnerChannelFactory<TChannel> 方法
定义
返回一个值,该值指示内部通道工厂是否可以生成指定类型的通道。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
类型参数
返回
如果内部通道工厂可以生成指定的 true,则为 TChannel;否则为 false。true if the inner channel factory can produce the specified TChannel; otherwise, false.
示例
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)()