Binding.CanBuildChannelFactory Binding.CanBuildChannelFactory Binding.CanBuildChannelFactory Binding.CanBuildChannelFactory Method

定义

返回一个值,该值指示当前绑定是否可以在客户端上生成满足某些特定条件的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies some specific criteria.

重载

CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在客户端上生成满足指定绑定参数集合的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the collection of binding parameters specified.

CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在客户端上生成满足对象数组所指定的需求的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the requirements specified by an object array.

注解

如果要在实际生成工厂之前检查是否可以为提供的 TChannel 生成 context 类型通道的通道工厂,请使用此方法。Use this method if you want to check that the channel factory for channels of type TChannel can be build for the context provided before attempting to actually build the factory. 或者,通过调用 BuildChannelFactory 来生成通道工厂,并捕捉无法生成时所生成的异常。Alternatively, try to build the channel factory by calling BuildChannelFactory and catch the exception generated if it cannot be built.

CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection) CanBuildChannelFactory<TChannel>(BindingParameterCollection)

返回一个值,该值指示当前绑定是否可以在客户端上生成满足指定绑定参数集合的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the collection of binding parameters specified.

public:
generic <typename TChannel>
 virtual bool CanBuildChannelFactory(System::ServiceModel::Channels::BindingParameterCollection ^ parameters);
public virtual bool CanBuildChannelFactory<TChannel> (System.ServiceModel.Channels.BindingParameterCollection parameters);
abstract member CanBuildChannelFactory : System.ServiceModel.Channels.BindingParameterCollection -> bool
override this.CanBuildChannelFactory : System.ServiceModel.Channels.BindingParameterCollection -> bool
Public Overridable Function CanBuildChannelFactory(Of TChannel) (parameters As BindingParameterCollection) As Boolean

类型参数

TChannel

要为其进行工厂测试的通道类型。The type of channel for which the factory is being tested.

参数

parameters
BindingParameterCollection BindingParameterCollection BindingParameterCollection BindingParameterCollection

为生成的通道工厂指定要求的 BindingParameterCollectionThe BindingParameterCollection that specifies requirements for the channel factory that is built.

返回

如果可以在客户端上生成指定的通道工厂堆栈,则为 true;否则为 falsetrue if the specified channel factory stack can be build on the client; otherwise, false.

注解

如果要在实际生成工厂之前检查是否可以为提供的 TChannel 生成 parameters 类型通道的通道工厂,请使用此方法。Use this method if you want to check that the channel factory for channels of type TChannel can be build for the binding parameters specified before attempting to actually build the factory. 或者,通过调用 BuildChannelFactory<TChannel>(BindingParameterCollection) 来生成通道工厂,并捕捉无法生成时所生成的异常。Alternatively, try to build the channel factory by calling BuildChannelFactory<TChannel>(BindingParameterCollection) and catch the exception generated if it cannot be built.

CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[]) CanBuildChannelFactory<TChannel>(Object[])

返回一个值,该值指示当前绑定是否可以在客户端上生成满足对象数组所指定的需求的通道工厂堆栈。Returns a value that indicates whether the current binding can build a channel factory stack on the client that satisfies the requirements specified by an object array.

public:
generic <typename TChannel>
 bool CanBuildChannelFactory(... cli::array <System::Object ^> ^ parameters);
public bool CanBuildChannelFactory<TChannel> (params object[] parameters);
member this.CanBuildChannelFactory : obj[] -> bool
Public Function CanBuildChannelFactory(Of TChannel) (ParamArray parameters As Object()) As Boolean

类型参数

TChannel

要为其进行工厂测试的通道类型。The type of channel for which the factory is being tested.

参数

parameters
Object[]

为生成的通道工厂指定需求的对象数组。The object array that specifies requirements for the channel factory that is built.

返回

如果可以在客户端上生成指定的通道工厂堆栈,则为 true;否则为 falsetrue if the specified channel factory stack can be build on the client; otherwise, false.

注解

如果要在实际生成工厂之前检查是否可以为提供的 TChannel 生成 parameters 类型通道的通道工厂,请使用此方法。Use this method if you want to check that the channel factory for channels of type TChannel can be build for the binding parameters specified before attempting to actually build the factory. 或者,通过调用 BuildChannelFactory<TChannel>(Object[]) 来生成通道工厂,并捕捉无法生成时所生成的异常。Alternatively, try to build the channel factory by calling BuildChannelFactory<TChannel>(Object[]) and catch the exception generated if it cannot be built.

适用于