Class Shell
Inheritance
System.Object
Shell
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
Namespace: PiTung.Console
Assembly: PiTung.dll
Syntax
public static class Shell
Methods
| Improve this Doc View SourceGetCommandNames()
Returns the names of the available commands
Declaration
public static IEnumerable<string> GetCommandNames()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumerable containing the names of the variables |
GetVariable(String)
Obtains the value of a global variable
Declaration
public static string GetVariable(string variable)
Parameters
Type | Name | Description |
---|---|---|
System.String | variable | The variable to get |
Returns
Type | Description |
---|---|
System.String | The value, or null if variable is not set |
GetVariables()
Returns the names of the variables in the registry
Declaration
public static IEnumerable<string> GetVariables()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<System.String> | An enumerable containing the names of the variables |
RegisterCommand(Command)
Register a command.
Declaration
public static bool RegisterCommand(Command command)
Parameters
Type | Name | Description |
---|---|---|
Command | command | The command class. |
Returns
Type | Description |
---|---|
System.Boolean |
RegisterCommand<T>()
Register a command.
Declaration
public static bool RegisterCommand<T>()
where T : Command
Returns
Type | Description |
---|---|
System.Boolean |
Type Parameters
Name | Description |
---|---|
T | The type of the command. |
SetVariable(String, String)
Saves the value of a global variable
Declaration
public static void SetVariable(string variable, string value)
Parameters
Type | Name | Description |
---|---|---|
System.String | variable | The variable to set |
System.String | value | The value to give |