Share via


IContractBehavior.ApplyClientBehavior Method

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

Implements a modification or extension of the client across a contract.

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

Syntax

'Declaration
Sub ApplyClientBehavior ( _
    contractDescription As ContractDescription, _
    endpoint As ServiceEndpoint, _
    clientRuntime As ClientRuntime _
)
void ApplyClientBehavior(
    ContractDescription contractDescription,
    ServiceEndpoint endpoint,
    ClientRuntime clientRuntime
)

Parameters

Remarks

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

This method is called once for each endpoint that uses the specified service contract.

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 ClientOperation objects in the Operations property.

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.