public void AddLogging() { var commandHandler = new SlowRunningCommandHandler(); var loggingDecorator = new LoggingDecorator <SlowRunningCommand>(commandHandler); loggingDecorator.Handle(new SlowRunningCommand(1234)); }
public void MeasureTime() { var commandHandler = new SlowRunningCommandHandler(); var timedDecorator = new TimedDecorator <SlowRunningCommand>(commandHandler); var loggedDecorator = new LoggingDecorator <SlowRunningCommand>(timedDecorator); loggedDecorator.Handle(new SlowRunningCommand(1234)); }