public static MultipleLogWriter GetInitialize()
        {
            if (initialize == null)
            {
                initialize = new MultipleLogWriter();
            }

            return(initialize);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            ILogWriter p1 = FileLogWriter.GetInitialize();
            ILogWriter p2 = ConsoleLogWriter.GetInitialize();


            var p3 = MultipleLogWriter.GetInitialize();

            p3.List.Add(p2);
            p3.List.Add(p1);
            p3.LogError("poshaluysta");
        }
Beispiel #3
0
        static void Main(string[] args)
        {
            ILogWriter p1 = new FileLogWriter();
            ILogWriter p2 = new ConsoleLogWriter();

            List <ILogWriter> list = new List <ILogWriter>
            {
                p1, p2
            };

            var p3 = new MultipleLogWriter(list);

            p3.LogError("poshaluysta");
        }