static void Main(string[] args) { var client = new ComponentClient(new ComponentDecorator(new ConcreteComponent())); client.Process(); Console.ReadKey(); }
static void Main(string[] args) { var client = new ComponentClient(null); client.Run(); Console.ReadKey(); }
static void Main(string[] args) { var client = new ComponentClient(new ProfilingComponent(new SlowComponent(), new LoggingStopwatch(new StopwatchAdapter(new Stopwatch())))); client.Run(); Console.ReadKey(); }
static void Main(string[] args) { var client = new ComponentClient(new ProfilingComponent(new SlowComponent())); client.Run(); Console.ReadKey(); }
static void Main(string[] args) { var client = new ComponentClient(new Lazy <IComponent>(() => new ConcreteComponent())); client.Run(); }
static void Main(string[] args) { var client = new ComponentClient(new Lazy<IComponent>(() => new ConcreteComponent())); client.Run(); }