//Using Composition and IoC to add a logging to the IService implementation without violating OCP. //Instantiate with: For.Use().Ctor().Is(); // //create a LoggingService : IService that takes the *real* IService in it's c'tor public class LoggingService : IService { private IService _realService; private ILogger _log; public LoggingService(IService realService, ILogger log) { _realService = realService; _log = log; } public void DoStuff() { _log.Log("Doing some stuff"); _realService.DoStuff(); } }