IOperationBehavior::ApplyDispatchBehavior Method (OperationDescription^, DispatchOperation^)

 

Implements a modification or extension of the service across an operation.

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

void ApplyDispatchBehavior(
	OperationDescription^ operationDescription,
	DispatchOperation^ dispatchOperation
)

Parameters

operationDescription
Type: System.ServiceModel.Description::OperationDescription^

The operation being examined. Use for examination only. If the operation description is modified, the results are undefined.

dispatchOperation
Type: System.ServiceModel.Dispatcher::DispatchOperation^

The run-time object that exposes customization properties for the operation described by operationDescription.

Implement the ApplyDispatchBehavior method to view, modify, or extend the service runtime across all messages or for a specific operation. For details about what customizations you can do in a service application, see System.ServiceModel.Dispatcher::DispatchRuntime and System.ServiceModel.Dispatcher::DispatchOperation.

It is recommended that the ApplyDispatchBehavior method throw a NotImplementedException exception if the behavior is only intended for use in a client application.

The following code example shows an implementation of System.ServiceModel.Dispatcher::IParameterInspector that writes to the console when the inspector is invoked on an operation. This customization can only be attached to the System.ServiceModel.Dispatcher::DispatchOperation or System.ServiceModel.Dispatcher::ClientOperation and is therefore usually inserted by an operation behavior.

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

The following code example shows how the operation behavior attaches the parameter inspector to the runtime.

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

Universal Windows Platform
Available since 8
.NET Framework
Available since 3.0
Portable Class Library
Supported in: portable .NET platforms
Silverlight
Available since 4.0
Return to top
Show: