Data used for giving user prompts.
Inheritance: System.EventArgs
Exemple #1
0
        public void Function()
        {
            var handle = new ManualResetEvent(false);
            var e      = new PauseEventArgs(handle);

            Parser.RaisePause(Context, e);
            handle.WaitOne();
        }
Exemple #2
0
 /// <summary>
 /// Raises the input prompt if in interactive mode.
 /// </summary>
 /// <param name="e">The input arguments.</param>
 internal void RaisePause(PauseEventArgs e)
 {
     if (InteractiveMode && PauseDemanded != null)
     {
         PauseDemanded(this, e);
     }
     else
     {
         e.Continue();
     }
 }
Exemple #3
0
 /// <summary>
 /// Raises the input prompt if in interactive mode.
 /// </summary>
 /// <param name="sender">The sending context that demands the user input.</param>
 /// <param name="e">The input arguments.</param>
 public static void RaisePause(ParseContext sender, PauseEventArgs e)
 {
     if (InteractiveMode && OnPauseDemanded != null)
     {
         OnPauseDemanded(sender, e);
     }
     else
     {
         e.Continue();
     }
 }
Exemple #4
0
 /// <summary>
 /// Raises the input prompt if in interactive mode.
 /// </summary>
 /// <param name="e">The input arguments.</param>
 internal void RaisePause(PauseEventArgs e)
 {
     if (InteractiveMode && PauseDemanded != null)
     {
         PauseDemanded(this, e);
     }
     else
     {
         e.Continue();
     }
 }
Exemple #5
0
 static void OnPauseDemanded(Object sender, PauseEventArgs e)
 {
     Console.WriteLine("Press any key to continue . . . ");
     Console.ReadKey(true);
     e.Continue();
 }