Export (0) Print
Expand All

IParameterInspector.BeforeCall Method

Called before client calls are sent and after service responses are returned.

Namespace:  System.ServiceModel.Dispatcher
Assemblies:   System.ServiceModel (in System.ServiceModel.dll)
  System.ServiceModel.Primitives (in System.ServiceModel.Primitives.dll)

abstract BeforeCall : 
        operationName:string * 
        inputs:Object[] -> Object

Parameters

operationName
Type: System.String

The name of the operation.

inputs
Type: System.Object[]

The objects passed to the method by the client.

Return Value

Type: System.Object
The correlation state that is returned as the correlationState parameter in AfterCall. Return a null reference (Nothing in Visual Basic) if you do not intend to use correlation state.

On outbound calls from a client, the inspector is invoked before the request contents are serialized and sent to the service. The inspector is also called after the response has been deserialized but before the return values have been dispatched to the proxy method.

On inbound calls to a service, the inspector is invoked after the request contents are deserialized and dispatched to the service operation and before the response contents are serialized and sent to the client.

The following code example shows an IParameterInspector implementation that:

  • Writes the operation name and return value to the console after a response has been deserialized by the service or a request has been serialized by a client.

  • Writes the operation name to the console after deserializing a response on the client or after a response is serialized on the service.

No code example is currently available or this language may not be supported.

The following code example shows how to use either System.ServiceModel.Description.IOperationBehavior, System.ServiceModel.Description.IEndpointBehavior or System.ServiceModel.Description.IServiceBehavior to insert IParameterInspector objects.

No code example is currently available or this language may not be supported.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1
Show:
© 2015 Microsoft