IServiceBehavior.AddBindingParameters Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides the ability to pass custom data to binding elements to support the contract implementation.
public:
void AddBindingParameters(System::ServiceModel::Description::ServiceDescription ^ serviceDescription, System::ServiceModel::ServiceHostBase ^ serviceHostBase, System::Collections::ObjectModel::Collection<System::ServiceModel::Description::ServiceEndpoint ^> ^ endpoints, System::ServiceModel::Channels::BindingParameterCollection ^ bindingParameters);
public void AddBindingParameters (System.ServiceModel.Description.ServiceDescription serviceDescription, System.ServiceModel.ServiceHostBase serviceHostBase, System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ServiceEndpoint> endpoints, System.ServiceModel.Channels.BindingParameterCollection bindingParameters);
abstract member AddBindingParameters : System.ServiceModel.Description.ServiceDescription * System.ServiceModel.ServiceHostBase * System.Collections.ObjectModel.Collection<System.ServiceModel.Description.ServiceEndpoint> * System.ServiceModel.Channels.BindingParameterCollection -> unit
Public Sub AddBindingParameters (serviceDescription As ServiceDescription, serviceHostBase As ServiceHostBase, endpoints As Collection(Of ServiceEndpoint), bindingParameters As BindingParameterCollection)
Parameters
- serviceDescription
- ServiceDescription
The service description of the service.
- serviceHostBase
- ServiceHostBase
The host of the service.
- endpoints
- Collection<ServiceEndpoint>
The service endpoints.
- bindingParameters
- BindingParameterCollection
Custom objects to which binding elements have access.
Remarks
Use the AddBindingParameters method to add custom data objects to the parameters
collection that binding elements can use to acquire extra information to enable them to support the contract.
This method is called once for each listen URI. For example, if a service has four endpoints, and two of them have the same listen URI, then this method gets called three times. The reason is that the bindingParameters
target each channel stack and there is one channel stack for each listen URI. Because each call receives those endpoints at that listen URI, two calls each get a single System.ServiceModel.Description.ServiceEndpoint, and one call gets a collection of two System.ServiceModel.Description.ServiceEndpoint objects.
Note
All of the IServiceBehavior methods pass System.ServiceModel.Description.ServiceDescription and System.ServiceModel.ServiceHostBase objects as a parameters. The ServiceDescription parameter is for examination and insertion of customizations only; if you otherwise modify these objects the execution behavior is undefined.
Applies to
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기