Ejemplo n.º 1
0
        /// <summary>
        /// Handles Process Output Streams.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="eventArgs"></param>
        internal static void ReceiveOutput(object sender, DataReceivedEventArgs eventArgs)
        {
            if (eventArgs == null)
            {
                return;
            }
            var senderPid = ((Process)sender).Id;
            var args      = new OutputEventArgs {
                OutputData = eventArgs.Data, ProcessId = senderPid
            };

            OnProcessOutput(sender, args);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Calls OutputReceived Event.
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="eventArgs"></param>
 internal static void OnProcessOutput(object sender, OutputEventArgs eventArgs)
 {
     OutputReceived?.Invoke(sender, eventArgs);
 }