共用方式為


ServiceAuthenticationBehavior.IServiceBehavior.AddBindingParameters 方法

定義

 virtual void System.ServiceModel.Description.IServiceBehavior.AddBindingParameters(System::ServiceModel::Description::ServiceDescription ^ description, System::ServiceModel::ServiceHostBase ^ serviceHostBase, System::Collections::ObjectModel::Collection<System::ServiceModel::Description::ServiceEndpoint ^> ^ endpoints, System::ServiceModel::Channels::BindingParameterCollection ^ parameters) = System::ServiceModel::Description::IServiceBehavior::AddBindingParameters;
void IServiceBehavior.AddBindingParameters (System.ServiceModel.Description.ServiceDescription description, System.ServiceModel.ServiceHostBase serviceHostBase, System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ServiceEndpoint> endpoints, System.ServiceModel.Channels.BindingParameterCollection parameters);
abstract member System.ServiceModel.Description.IServiceBehavior.AddBindingParameters : System.ServiceModel.Description.ServiceDescription * System.ServiceModel.ServiceHostBase * System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ServiceEndpoint> * System.ServiceModel.Channels.BindingParameterCollection -> unit
override this.System.ServiceModel.Description.IServiceBehavior.AddBindingParameters : System.ServiceModel.Description.ServiceDescription * System.ServiceModel.ServiceHostBase * System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ServiceEndpoint> * System.ServiceModel.Channels.BindingParameterCollection -> unit
Sub AddBindingParameters (description As ServiceDescription, serviceHostBase As ServiceHostBase, endpoints As Collection(Of ServiceEndpoint), parameters As BindingParameterCollection) Implements IServiceBehavior.AddBindingParameters

參數

description
ServiceDescription

服務的服務描述。

serviceHostBase
ServiceHostBase

服務的主機。

endpoints
Collection<ServiceEndpoint>

服務端點。

parameters
BindingParameterCollection

繫結項目可存取的自訂物件。

實作

備註

這個方法會針對每個接聽 URI 呼叫一次。 例如,如果服務有四個端點,其中兩個具有相同的接聽 URI,便會呼叫這個方法三次。 這是因為 bindingParameters 是以每個通道堆疊為目標,且每個接聽 URI 都有一個通道堆疊。 由於每個呼叫都會收到該接聽 URI 上的這些端點,因此兩個呼叫會分別取得單一 ServiceEndpoint,而一個呼叫會取得兩個 ServiceEndpoint 物件的集合。

適用於