Пример #1
0
        /// <summary>
        /// Main entry point to the application
        /// </summary>
        /// <param name="args">Arguments</param>
        static void Main(string[] args)
        {
            Trace.Listeners.Add(new ConsoleTraceListener());

            var arguments = new ConsoleSwitches(args);

            RunAction(() =>
            {
                DoAction(arguments);
            }, true);
        }
Пример #2
0
        /// <summary>
        /// Executes an action on the application
        /// </summary>
        /// <param name="args"></param>
        static void DoAction(ConsoleSwitches args)
        {
            Console.WriteLine("Type STOP to end recording on session {0}", args.SessionName);
            var message       = Console.ReadLine();
            var fileShareSend = new ProcessShare(args.SessionName);
            var result        = fileShareSend.WriteMessage(message);

            if (!result)
            {
                Console.WriteLine("Failed to send message {0} on recording session {1}", message, args.SessionName);
                return;
            }
            Console.WriteLine("Message succesful");

            Console.WriteLine("Waiting for completed signal");

            var fileShareRec = new ProcessShare(args.SessionName + "_BACK");

            fileShareRec.WaitForText(ValidateMessage, TimeSpan.FromMinutes(2), 1000);

            Console.WriteLine("Process completed");
        }