예제 #1
0
        private static void Main(string[] args)
        {
            ILogger logger = new FileLogger();

            var setterInjectionLogger = new LoggingEngine();

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