|
AdaptersAndDecorators
Autofac provides features to help with implementing the adapter and decorator patterns.
AdaptersAn adapter takes the one service contract and adapts it to another. When an adapter is registered with Autofac, a separate adapter will be created for every implementation of the adapted service. This introductory article describes how adapters are implemented with Autofac. DecoratorsA decorator is like an adapter in that it wraps implementations of a specific service, but in contrast to adapters, decorators expose the same service as they decorate. See this article for details on the decorator support added in Autofac 2.4. | |
► Sign in to add a comment