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 对象的集合。

适用于