BindingContext.CanBuildInnerChannelFactory<TChannel> 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
返回一个值,该值指示内部通道工厂是否可以生成指定类型的通道。
public:
generic <typename TChannel>
bool CanBuildInnerChannelFactory();
public bool CanBuildInnerChannelFactory<TChannel> ();
member this.CanBuildInnerChannelFactory : unit -> bool
Public Function CanBuildInnerChannelFactory(Of TChannel) () As Boolean
类型参数
- TChannel
内部通道工厂生成的 IChannel 对象的类型。
返回
如果内部通道工厂可以生成指定的 true
,则为 TChannel
;否则为 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)()