public static void Run(string environment) { IocContainer.Setup(environment); var x = new ClientX(); var y = new ClientY(); x.MethodA(); y.MethodB(); }
public static void Run(string environment) { ILoggable log; ICalculator calculator; if (environment == "production") { log = new Logger(); calculator = new Calculator(log); } else { log = new AlternativeLogger(); calculator = new AlternativeCalculator(log); } var x = new ClientX(calculator); var y = new ClientY(calculator); x.MethodA(); y.MethodB(); }