Пример #1
0
        public override void Run()
        {
            var loggerA = MultiLogger.GetLogger();
            var loggerB = MultiLogger.GetLogger();

            if (loggerA.Equals(loggerB))
            {
                Console.WriteLine("The same instances");
            }

            loggerA.WriteLine("Test A");
            loggerB.WriteLine("Test B");
        }
Пример #2
0
 public static MultiLogger GetLogger()
 {
     return(logger ?? (logger = new MultiLogger()));
 }