예제 #1
0
        static void Main(string[] args)
        {
            if (!EnsureSingleLoad())
            {
                Console.WriteLine("{0}: Another Instance Currently Runing", DateTime.Now);
                return;
            }

            var streamMonitor = new DualStreamMonitor(Console.Out);

            streamMonitor.Start();

            while (Console.ReadLine() != "exit")
            {
                ;
            }
            streamMonitor.Stop();
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (!EnsureSingleLoad())
            {
                Console.WriteLine("{0}: Another Instance Currently Running", DateTime.Now);
                return;
            }

            var users = UsersCollection.PrimaryUsers() ?? new List <PostworthyUser>();

            users.AsParallel().ForAll(u =>
            {
                var streamMonitor = new DualStreamMonitor(u, Console.Out);
                streamMonitor.Start();

                while (Console.ReadLine() != "exit")
                {
                    ;
                }

                streamMonitor.Stop();
            });
        }