Exemplo n.º 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();
        }
Exemplo n.º 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();
            });
        }