Binding.CanBuildChannelFactory 方法

定義

傳回值,這個值指出目前的繫結是否可以在用戶端上建置滿足某個特定準則的通道處理站堆疊。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)

傳回值,這個值指出目前的繫結是否可以在用戶端上建置滿足指定之繫結參數集合的通道處理站堆疊。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[])

傳回值,這個值指出目前的繫結程序是否可以在用戶端上建置滿足物件陣列指定之需求的通道處理站堆疊。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)

傳回值,這個值指出目前的繫結是否可以在用戶端上建置滿足指定之繫結參數集合的通道處理站堆疊。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

指定所建置之通道處理站需求的 BindingParameterCollectionThe BindingParameterCollection that specifies requirements for the channel factory that is built.

傳回

Boolean

如果可以在用戶端上建置指定的通道處理站堆疊則為 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[])

傳回值,這個值指出目前的繫結程序是否可以在用戶端上建置滿足物件陣列指定之需求的通道處理站堆疊。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.

傳回

Boolean

如果可以在用戶端上建置指定的通道處理站堆疊則為 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.

適用於