Command line interpreter for your CLI program. (命令行解释器,请注意,在调试模式之下,命令行解释器会在运行完命令之后暂停,而Release模式之下则不会。 假若在调试模式之下发现程序有很长一段时间处于cpu占用为零的静止状态,则很有可能已经运行完命令并且等待 回车退出)
Interpreter
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| ToDictionary | 1 | Gets the dictionary data which contains all of the available command information in this assembly module. |
| Execute | 3 | Execute the specific command line using this interpreter. |
| doExecuteNonCLIInput | 1 | 命令行是空的话,假若Interpreter.ExecuteEmptyCli不是空值的话,会优先执行Interpreter.ExecuteEmptyCli函数指针 否则打印出所有的命令名称信息 |
| apiInvoke | 1 | The interpreter runs all of the command from here.(所有的命令行都从这里开始执行) |
| exec_shell_script_internal | 1 | Some magic tweaks will be made in this function call |
| IsPossibleRequestFile | 1 | |
| SDKdocs | 1 | Generate the sdk document for the target program assembly.(生成目标应用程序的命令行帮助文档,markdown格式的) |
| AddCommand | 1 | Add a command in current cli interpreter.(x向当前的这个CLI命令行解释器之中添加一个命令) |
| Help | 1 | Gets the help information of a specific command using its name property value.(获取某一个命令的帮助信息) |
| .ctor | 1 | |
| __getsAllCommands | 1 | 导出所有符合条件的静态方法 |
| GetAllCommands | 1 | 导出所有符合条件的静态方法,请注意,在这里已经将外部的属性标记和所属的函数的入口点进行连接了 |
| getAPI | 1 | 从方法定义MethodInfo之中解析出命令行的定义 |
| doLoadApiInternal | 1 | 在这里将外部的属性标记和所属的函数的入口点进行连接 |
| CreateEmptyCLIObject | 1 | Create an empty cli command line interpreter object which contains no commands entry. |
| CreateInstance | 3 | |
| CreateInstance | 1 | Create a new interpreter instance using the specific type information. |
| Clear | 1 | Clear the hash table of the cli command line interpreter command entry points.(清除本CLI解释器之中的所有的命令行执行入口点的哈希数据信息) |
| ExistsCommand | 1 | The target command line command is exists in this cli interpreter using it name property?(判断目标命令行命令是否存在于本CLI命令行解释器之中) |
| ListingRelated | 1 | 列举出所有可能的命令 |
| ToString | 1 | |
| Dispose | 1 | |
| GetEnumerator | 1 | |
| GetEnumerator1 | 1 | |
| Add | 2 | |
| Contains | 1 | |
| CopyTo | 1 | |
| Remove | 1 | |
| GetPossibleCommand | 1 | |
| TryGetValue | 1 |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| ExecuteFile | 1 | Public Delegate Function ExecuteFile(path As String, args As String()) As Integer, (ExecuteFile: 假若所传入的命令行的name是文件路径,解释器就会执行这个函数指针) 这个函数指针一般是用作于执行脚本程序的 |
| ExecuteEmptyCli | 1 | Public Delegate Function ExecuteEmptyCli() As Integer, (ExecuteEmptyCLI: 假若所传入的命令行是空的,就会执行这个函数指针) |
| ListCommandInfo | 1 | Returns the command entry info list array. |
| Type | 1 | The CLI API container Module/Class type information.(申明这个解释器的命令行API容器类型) |
| Count | 1 | Gets the command counts in current cli interpreter.(返回本CLI命令行解释器之中所包含有的命令的数目) |
| Item | 1 | |
| APINameList | 1 | List all of the command line entry point name which were contains in this cli interpreter. |
| APIList | 1 | 当前的解释器内所容纳的所有的CLI API列表 |
| ExecuteNotFound | 1 | |
| ExecuteQuery | 1 | |
| Stack | 1 | |
| Info | 1 | |
| IsReadOnly | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| apiTable | 1 | 在添加之前请确保键名是小写的字符串 |
05 Members
Gets the dictionary data which contains all of the available command information in this assembly module. (获取从本模块之中获取得到的所有的命令行信息)
Execute the specific command line using this interpreter.
| Name | Type | Description |
|---|---|---|
args | CommandLine | The user input command line string. |
String())Process the command option arguments of the main function:
Public Function Main(argvs As String()) As Integer
| Name | Type | Description |
|---|---|---|
CommandLineArgs | String() | The cli command line parameter string value collection. |
命令行是空的话,假若Interpreter.ExecuteEmptyCli不是空值的话,会优先执行Interpreter.ExecuteEmptyCli函数指针 否则打印出所有的命令名称信息
String())The interpreter runs all of the command from here.(所有的命令行都从这里开始执行)
| Name | Type | Description |
|---|---|---|
args | CommandLine | 就只有一个命令行对象 |
help_argvs | String() | - |
Some magic tweaks will be made in this function call
| Name | Type | Description |
|---|---|---|
filename | String | - |
argv | CommandLine | - |
String)| Name | Type | Description |
|---|---|---|
target | String | - |
returns true if the given target is local file path or http/https/ftp url
Generate the sdk document for the target program assembly.(生成目标应用程序的命令行帮助文档,markdown格式的)
Add a command in current cli interpreter.(x向当前的这个CLI命令行解释器之中添加一个命令)
| Name | Type | Description |
|---|---|---|
Command | APIEntryPoint | - |
String)Gets the help information of a specific command using its name property value.(获取某一个命令的帮助信息)
| Name | Type | Description |
|---|---|---|
CommandName | String | If the paramteer command name value is a empty string then this function will list all of the commands' help information.(假若本参数为空则函数会列出所有的命令的帮助信息) |
Error code, ZERO for no error
Type, String)| Name | Type | Description |
|---|---|---|
type | Type | A module or a class which contains some shared method for the command entry. (包含有若干使用ExportAPIAttribute进行标记的命令行执行入口点的Module或者Class对象类型, 可以使用 Object.GetType/GetType 关键词操作来获取所需要的类型信息) |
Type, Boolean)导出所有符合条件的静态方法
| Name | Type | Description |
|---|---|---|
Type | Type | - |
throw | Boolean | - |
Type, Boolean)导出所有符合条件的静态方法,请注意,在这里已经将外部的属性标记和所属的函数的入口点进行连接了
| Name | Type | Description |
|---|---|---|
type | Type | - |
throw | Boolean | - |
MethodInfo, Type, Boolean)从方法定义MethodInfo之中解析出命令行的定义
| Name | Type | Description |
|---|---|---|
methodInfo | MethodInfo | - |
commandAttribute | Type | - |
[throw] | Boolean | - |
在这里将外部的属性标记和所属的函数的入口点进行连接
Create an empty cli command line interpreter object which contains no commands entry. (创建一个没有包含有任何命令入口点的空的CLI命令行解释器)
Type)Create a new interpreter instance from a specific type information. (从目标类型之中构造出一个命令行解释器)
| Name | Type | Description |
|---|---|---|
Type | Type | - |
String)Create a new interpreter instance from a specific dll/exe path, this program assembly file should be a standard .NET assembly. (从一个标准的.NET程序文件之中构建出一个命令行解释器)
| Name | Type | Description |
|---|---|---|
assmPath | String | DLL/EXE file path.(标准的.NET程序集文件的文件路径) |
Create a new interpreter instance using the specific type information. (使用所制定的目标类型信息构造出一个CLI命令行解释器)
| Name | Description |
|---|---|
T |
Clear the hash table of the cli command line interpreter command entry points.(清除本CLI解释器之中的所有的命令行执行入口点的哈希数据信息)
String)The target command line command is exists in this cli interpreter using it name property?(判断目标命令行命令是否存在于本CLI命令行解释器之中)
| Name | Type | Description |
|---|---|---|
CommandName | String | The command name value is not case sensitive.(命令的名称对大小写不敏感的) |
String)列举出所有可能的命令
| Name | Type | Description |
|---|---|---|
query | String | 模糊匹配 |
Public Delegate Function __ExecuteFile(path As String, args As String()) As Integer, (ExecuteFile: 假若所传入的命令行的name是文件路径,解释器就会执行这个函数指针) 这个函数指针一般是用作于执行脚本程序的
Public Delegate Function __ExecuteEmptyCli() As Integer, (ExecuteEmptyCLI: 假若所传入的命令行是空的,就会执行这个函数指针)
Returns the command entry info list array.
The CLI API container Module/Class type information.(申明这个解释器的命令行API容器类型)
Gets the command counts in current cli interpreter.(返回本CLI命令行解释器之中所包含有的命令的数目)
String)| Name | Type | Description |
|---|---|---|
key | String | 调用前需要转换为小写字母的形式 |
List all of the command line entry point name which were contains in this cli interpreter. (列举出本CLI命令行解释器之中的所有的命令行执行入口点的名称)
当前的解释器内所容纳的所有的CLI API列表
在添加之前请确保键名是小写的字符串
String, String())KeyValuePair(Of String, APIEntryPoint))KeyValuePair(Of String, APIEntryPoint))KeyValuePair(Of String, APIEntryPoint)(), Int32)KeyValuePair(Of String, APIEntryPoint))String, APIEntryPoint)String, APIEntryPoint)