static void Main(string[] args)
        {
            Trace.Listeners.Add(new ConsoleTraceListener());
            var sessionName = "LUVAL-RECORDING";

            Console.WriteLine("Enter the message to send to file session {0}", sessionName);
            var message       = Console.ReadLine();
            var fileShareSend = new ProcessShare(sessionName);
            var result        = fileShareSend.WriteMessage(message);

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

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

            var fileShareRec = new ProcessShare(sessionName + "_BACK");

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

            Console.WriteLine("Process completed");
        }
        private static void SendStopSignal()
        {
            var messageShare = new ProcessShare(Utils.GetSessionName());

            Trace.TraceInformation("Sending stop signal for recording on session {0}", messageShare.SessionName);
            messageShare.WriteMessage("stop");
            Trace.TraceInformation("Stop signal for session {0} completed", messageShare.SessionName);
        }
Beispiel #3
0
        private static void SendCompleteSignal()
        {
            var fileShare   = new ProcessShare(_info.SessionName + "_BACK", TimeSpan.FromMinutes(1));
            var processData = new ProcessShareData();

            processData["status"]   = "complete";
            processData["filename"] = _info.FileName;
            fileShare.WriteMessage(processData.ToString());
        }
Beispiel #4
0
        private bool SendStopSignal()
        {
            var session = Utils.GetSessionName();

            Trace.TraceInformation("Sending the stop signal on session {0}", session);
            var fileShareSend = new ProcessShare(Utils.GetSessionName());
            var res           = fileShareSend.WriteMessage("stop");

            Trace.TraceInformation("Stop signal on session {0} posted", session);
            return(res);
        }
Beispiel #5
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");
        }