Прочетете на английски Редактиране

Споделяне чрез


IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime) Method

Definition

Implements a modification or extension of the client across an endpoint.

C#
public void ApplyClientBehavior(System.ServiceModel.Description.ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime);

Parameters

endpoint
ServiceEndpoint

The endpoint that is to be customized.

clientRuntime
ClientRuntime

The client runtime to be customized.

Remarks

Implement the ApplyClientBehavior method to view, modify, or add custom extension to the client runtime across all messages used with an endpoint or for specific operations. For details about what customizations you can do with a client run-time object, see ClientRuntime and ClientOperation.

It is recommended that the ApplyClientBehavior method throw a NotImplementedException if the behavior is only intended for use in a service application.

Because other behaviors may have already added or removed some operations from the runtime there is no guarantee that there are the same number of operations in the description as there are DispatchOperation objects in the Operations property.

Applies to

Продукт Версии
.NET Core 1.0, Core 1.1, 8 (package-provided), 9 (package-provided), 10 (package-provided)
.NET Framework 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0 (package-provided)
UWP 10.0