Compartir a través de


WebHttpBehavior.ApplyClientBehavior Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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)

Syntax

'Declaration
Public Overridable Sub ApplyClientBehavior ( _
    endpoint As ServiceEndpoint, _
    clientRuntime As ClientRuntime _
)
public virtual void ApplyClientBehavior(
    ServiceEndpoint endpoint,
    ClientRuntime clientRuntime
)

Parameters

Implements

IEndpointBehavior.ApplyClientBehavior(ServiceEndpoint, ClientRuntime)

Exceptions

Exception Condition
ArgumentNullException

Either the endpoint of the clientRuntime is nulla null reference (Nothing in Visual Basic).

Remarks

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.

Version Information

Silverlight

Supported in: 5, 4

Platforms

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