System.ServiceModel
4.0.0.0
Implement the interface to modify, examine, or extend some aspect of operation-wide execution at the application level for either client or service applications.
-
Use the method to pass custom data at runtime to enable bindings to support custom behavior.
-
Use the method to modify, examine, or insert extensions to a client dispatcher in a client application.
-
Use the method to modify, examine, or insert extensions to operation-wide execution in a service application.
-
Use the method to confirm that a meets specific requirements. This can be used to ensure that an operation has a certain configuration setting enabled, supports a particular feature and other requirements.
objects can make use of any of these methods, but often only one is important; in such cases, the unused methods can return, performing no action.
All of the methods pass an object as a parameter. This parameter is for examination only; if you modify the object the execution behavior is undefined.
objects are typically used to access the various properties of the object in a service application and the object in a client application.
Typically, the developer first reviews the extensibility points to determine which customization option suits the application scenario and then implements the customization at the appropriate scope. For example, objects can insert customizations for all messages in an entire service and objects can insert customizations for all messages across a specific contract, and so on. For a description of the various properties and customizations available, see Extending ServiceHost and the Dispatcher.
Once a customization has been decided upon (and the customization interface implemented if necessary) and the is the appropriate scope of customization, the customization must be inserted into the indigo1 runtime by implementing and adding the operation behavior to the runtime.
There are two ways to add the to the runtime:
-
Programmatically add the custom operation behavior to the property prior to the opening of the service host (in a service application) or the channel factory (in a client application).
-
Add the behavior using a custom attribute.
To perform the service customization task for which it is intended, the object must be added to the property prior to the construction of the service runtime, which occurs when method is called on . To perform a client customization task, the object must be added to the property before calling the method or the method on .
Although the operation behavior is designed for easy access to the runtime at the scope of an individual operation, you can access the runtime at a larger scope by accessing the parent runtime object.
Implements methods that can be used to extend run-time behavior for an operation in either a service or client application.
Method
4.0.0.0
System.Void
To be added.
To be added.
Implement the method to provide binding elements with the extra objects they require to support the operation behavior. When binding parameters are added here, the binding can locate and process these objects when the channel listener or channel factory is created. Typically, you implement the method to pass information about the operation to a custom binding element so that it can build a supporting channel correctly. Return no value if no modifications are required.
Implement to pass data at runtime to bindings to support custom behavior.
Method
4.0.0.0
System.Void
To be added.
To be added.
Implement the method to view, modify, or add a custom extension to the client runtime across all messages used with a specific operation. For details about what customizations you can do with a client run-time object, see and .
It is recommended that the method throw a if the behavior is only intended for use in a service application.
Implements a modification or extension of the client across an operation.
Method
4.0.0.0
System.Void
To be added.
To be added.
Implement the 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 and .
It is recommended that the method throw a exception if the behavior is only intended for use in a client application.
Implements a modification or extension of the service across an operation.
Method
4.0.0.0
System.Void
To be added.
Implement the method to examine the structure to confirm any set of criteria. It is not necessary to perform any customizations in or to make use of this method. If the operation passes validation, return; otherwise, throw an exception.
For example, the method can be use to ensure that an operation is authorized.
Implement to confirm that the operation meets some intended criteria.