forked from PowerShell/PowerShell
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConsoleShell.cs
More file actions
34 lines (29 loc) · 1.3 KB
/
Copy pathConsoleShell.cs
File metadata and controls
34 lines (29 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System.Management.Automation;
using System.Management.Automation.Runspaces;
namespace Microsoft.PowerShell
{
/// <summary>
/// This class provides an entry point which is called by minishell's main
/// to transfer control to Msh console host implementation.
/// </summary>
public static
class ConsoleShell
{
/// <summary>Entry point in to ConsoleShell. This method is called by main of minishell.</summary>
/// <param name="bannerText">Banner text to be displayed by ConsoleHost</param>
/// <param name="helpText">Help text for minishell. This is displayed on 'minishell -?'.</param>
/// <param name="args">Commandline parameters specified by user.</param>
/// <returns>An integer value which should be used as exit code for the process.</returns>
public static int Start(string bannerText, string helpText, string[] args)
{
if (args == null)
{
throw PSTraceSource.NewArgumentNullException("args");
}
return ConsoleHost.Start(bannerText, helpText, args);
}
}
}