var container = new Container(); container.Register(); container.AddAspect (new CachingAspect());
var container = new Container(); container.RegisterHere, the exception handling aspect is added to the IOrderService interface. The package library that contains the Container.AddAspect method is dependent on the specific dependency injection framework being used. For example: - Unity container: Microsoft.Practices.Unity (version 3 or later) - Autofac container: Autofac (version 3 or later) - Ninject container: Ninject (version 3 or later)(); container.AddAspect (new ExceptionHandlingAspect());