Пример #1
0
        public void WriteLogUsingInterfaceInjection(string message)
        {
            Interface_Dependency_Injection.LoggerEngine iEngine =
                new Interface_Dependency_Injection.LoggerEngine();

            Interface_Dependency_Injection.ILoggerInject loggerInject =
                new Interface_Dependency_Injection.FileLoggerInject()
            {
                FileDirectory = FileDirectory
            };

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            loggerInject = new Interface_Dependency_Injection.ConsoleLoggerInject();

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            loggerInject = new Interface_Dependency_Injection.XmlLoggerInject()
            {
                FileDirectory = FileDirectory
            };

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            iEngine = null;
        }
Пример #2
0
        public void WriteLogUsingInterfaceInjection(string message)
        {
            Interface_Dependency_Injection.LoggerEngine iEngine = 
                new Interface_Dependency_Injection.LoggerEngine();

            Interface_Dependency_Injection.ILoggerInject loggerInject = 
                new Interface_Dependency_Injection.FileLoggerInject() { FileDirectory = FileDirectory };

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            loggerInject = new Interface_Dependency_Injection.ConsoleLoggerInject();

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            loggerInject = new Interface_Dependency_Injection.XmlLoggerInject() { FileDirectory = FileDirectory };

            iEngine.Log(loggerInject, message);
            loggerInject = null;

            iEngine = null;
        }