Dependency Injection on your WCF & WF services
You are using an Inversion of Control container for your application components and you are exposing some services through WCF. Wouldn’t it be nice if you could host those services in your container and benefit from Dependency Injection ?
Well, that’s easy if you’re using Castle Project‘s Windsor container: just register the WcfIntegration facility and you’re on track:
- Public properties or Constructor arguments will automatically be injected by the container.
- Any component registered in the container that implements the IServiceBehavior or IOperationBehavior interfaces will be easily applicable to your WCF services.
Similarly, there is also a Workflow Foundation integration facility that provides the following functionalities:
- Host the WorkflowRuntime engine in the container, making it available for any workflow-aware components.
- Automatically add to the WorkflowRuntime any Workflow services (components inherited from WorkflowRuntimeService base class) or External Data exchange services (components with ExternalDataExchange attribute).
Hope one finds that interesting …


