/// <summary> /// Creates and initiates the listener instance. /// </summary> /// <param name="args">This parameter is not used.</param> private static void Main(string[] args) { // Display the welcome message... Console.Title = "PowerShell Console Host Sample Application"; ConsoleColor oldFg = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine(" PowerShell Console Host Interactive Sample"); Console.WriteLine(" ====================================="); Console.WriteLine(string.Empty); Console.WriteLine("This is an example of a simple interactive console host using the PowerShell"); Console.WriteLine("engine to interpret commands. Type 'exit' to exit."); Console.WriteLine(string.Empty); Console.ForegroundColor = oldFg; // Create the listener and run it - this never returns... PSListenerConsoleSample listener = new PSListenerConsoleSample(); listener.Run(); }
/// <summary> /// Creates and initiates the listener. /// </summary> /// <param name="args">The parameter is not used.</param> private static void Main(string[] args) { // Display the welcome message. Console.Title = "Windows PowerShell Console Host Application Sample"; ConsoleColor oldFg = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine(" Windows PowerShell Console Host Interactive Sample"); Console.WriteLine(" =================================================="); Console.WriteLine(string.Empty); Console.WriteLine("This is an example of a simple interactive console host that uses "); Console.WriteLine("the Windows PowerShell engine to interpret commands."); Console.WriteLine("Type 'exit' to exit."); Console.WriteLine(string.Empty); Console.ForegroundColor = oldFg; // Create the listener and runs it. This method never returns. PSListenerConsoleSample listener = new PSListenerConsoleSample(); listener.Run(); }
/// <summary> /// Creates and initiates the listener instance. /// </summary> /// <param name="args">This parameter is not used.</param> private static void Main(string[] args) { // Display the welcome message. Console.Title = "PowerShell Console Host Sample Application"; ConsoleColor oldFg = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine(" Windows PowerShell Console Host Application Sample"); Console.WriteLine(" =================================================="); Console.WriteLine(string.Empty); Console.WriteLine("This is an example of a simple interactive console host uses "); Console.WriteLine("the Windows PowerShell engine to interpret commands."); Console.WriteLine("Type 'exit' to exit."); Console.WriteLine(string.Empty); Console.ForegroundColor = oldFg; // Create the listener and runs it. This method never returns. PSListenerConsoleSample listener = new PSListenerConsoleSample(); listener.Run(); }
/// <summary> /// Creates and initiates the listener instance... /// </summary> /// <param name="args">Ignored for now...</param> static void Main(string[] args) { // Display the welcome message... Console.Title = "PowerShell Console Host Sample Application"; ConsoleColor oldFg = Console.ForegroundColor; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine(" PowerShell Console Host Interactive Sample"); Console.WriteLine(" ====================================="); Console.WriteLine(""); Console.WriteLine("This is an example of a simple interactive console host using the PowerShell"); Console.WriteLine("engine to interpret commands. Type 'exit' to exit."); Console.WriteLine(""); Console.ForegroundColor = oldFg; // Create the listener and run it - this never returns... PSListenerConsoleSample listener = new PSListenerConsoleSample(); listener.Run(); }