private static void Main(string[] args) { ILogger logger = new FileLogger(); var setterInjectionLogger = new LoggingEngine(); setterInjectionLogger.Logger = logger; setterInjectionLogger.Log("Setter Injection logging message"); }
private static void Main(string[] args) { ILogger logger = new FileLogger(); var constructorInjectionLogger = new LoggingEngine(logger); constructorInjectionLogger.Log("Constructor Injection logging message"); }