Export (0) Print
Expand All

IParameterInspector Interface

Defines the contract implemented by custom parameter inspectors that enables inspection or modification of information prior to and subsequent to calls on either the client or the service.

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

public interface class IParameterInspector

The IParameterInspector type exposes the following members.

  NameDescription
Public methodSupported in .NET for Windows Store appsAfterCallCalled after client calls are returned and before service responses are sent.
Public methodSupported in .NET for Windows Store appsBeforeCallCalled before client calls are sent and after service responses are returned.
Top

Implement the IParameterInspector interface to create a custom parameter inspector that can view and modify the contents of a call both before the call and after the call in either client or service applications.

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 parameters are deserialized but before they are dispatched to the service operation.

Use the ClientOperation::ParameterInspectors or the DispatchOperation::ParameterInspectors properties to add an IParameterInspector implementation to the inspectors collection for a particular operation.

Note   Developers and administrators must ensure that the interaction with other IParameterInspector implementations is understood.

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 has been 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.5.2, 4.5.1, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

.NET for Windows Store apps

Supported in: Windows 8

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft