WebHttpBehavior.ApplyClientBehavior Method

Implements the ApplyClientBehavior(ServiceEndpoint, ClientRuntime) method to support modification or extension of the client across an endpoint.

Namespace:  System.ServiceModel.Description
Assembly:  System.ServiceModel.Web.Extensions (in System.ServiceModel.Web.Extensions.dll)

public virtual void ApplyClientBehavior(
	ServiceEndpoint endpoint,
	ClientRuntime clientRuntime
)

Parameters

endpoint
Type: System.ServiceModel.Description.ServiceEndpoint
The endpoint that exposes the contract the client is to access.
clientRuntime
Type: System.ServiceModel.Dispatcher.ClientRuntime
The client to which the custom behavior is applied.

Implements

IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

ExceptionCondition
ArgumentNullException

Either the endpoint of the clientRuntime is null.

As part of this method, GetRequestClientFormatter(OperationDescription, ServiceEndpoint) and GetReplyClientFormatter(OperationDescription, ServiceEndpoint) are called for each operation to determine the IClientMessageFormatter to install. I also calls the AddClientErrorInspector(ServiceEndpoint, ClientRuntime) to add an inspector to the client runtime.

Silverlight

Supported in: 5, 4

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: