nuget server logo nuget api documents
↑

API Docs / Microsoft.VisualBasic.Runtime / CLIBuildMethod

CLIBuildMethod

Full name Microsoft.VisualBasic.CommandLine.InteropService.CLIBuildMethod Assembly Microsoft.VisualBasic.Runtime Members 9

01 Syntax

Microsoft.VisualBasic.CommandLine.InteropService.CLIBuildMethod

02 Methods

NameOverloadsSummary
GetCLI 1 Generates the command line string value for the invoked target cli program using this interop services object instance.
SimpleBuilder 1 Creates a command line string by using simply fills the name and parameter values
pathRule 1 The different between the String and Path is that applying CLIToken or Utils.CLIPath()).
formatToken 1 这个方法不会影响逻辑值类型
stringRule 1 可能包含有枚举值
stringEnumRule 1 将枚举类型的属性值转换为命令行的参数值,这个转换过程与Argv.Type的值相关 + CLITypes.String的时候,会直接调用ToString生成参数值 + CLITypes.Integer的时候,会将枚举值的数值作为命令行参数值
booleanRule 1 Property value to boolean flag in the CLI
ClearParameters 1 Reset the CLI parameters property in the target class object.

03 Fields

NameOverloadsSummary
convertMethods 1 Converts the property value to a CLI token

04 Members

method GetCLI #
GetCLI``1(``0, String)

Generates the command line string value for the invoked target cli program using this interop services object instance. (生成命令行参数)

Remarks

依照类型CLITypes来生成参数字符串

CLITypes.Boolean, True => 参数名; CLITypes.Double, CLITypes.Integer, CLITypes.String, => 参数名 + 参数值,假若字符串为空则不添加; (假若是枚举值类型,可能还需要再枚举值之中添加DescriptionAttribute属性) CLITypes.File, 假若字符串为空则不添加,有空格自动添加双引号,相对路径会自动转换为全路径。

Type Parameters
NameDescription
TInteropService

A class type object for interaction with a commandline program. (与命令行程序进行交互的模块对象类型)

Parameters
NameTypeDescription
app``0

目标交互对象的实例

method SimpleBuilder #
SimpleBuilder(String, IEnumerable(Of KeyValuePair(Of String, String)))

Creates a command line string by using simply fills the name and parameter values

Parameters
NameTypeDescription
nameString

-

argsIEnumerable(Of KeyValuePair(Of String, String))

-

method pathRule #
pathRule(Object, Argv, PropertyInfo)

The different between the String and Path is that applying CLIToken or Utils.CLIPath().

Parameters
NameTypeDescription
valueObject

只能是String类型的

attrArgv

-

propPropertyInfo

-

method formatToken #
formatToken(Argv, String)

这个方法不会影响逻辑值类型

Parameters
NameTypeDescription
attrArgv

-

valueString

-

method stringRule #
stringRule(Object, Argv, PropertyInfo)

可能包含有枚举值

Parameters
NameTypeDescription
valueObject

-

attrArgv

-

propPropertyInfo

-

method stringEnumRule #
stringEnumRule(Object, Argv, PropertyInfo)

将枚举类型的属性值转换为命令行的参数值,这个转换过程与Argv.Type的值相关

Parameters
NameTypeDescription
valueObject

-

attrArgv

-

propPropertyInfo

-

method booleanRule #
booleanRule(Object, Argv, PropertyInfo)

Property value to boolean flag in the CLI

Parameters
NameTypeDescription
valueObject

-

attrArgv

-

propPropertyInfo

-

method ClearParameters #
ClearParameters``1(``0)

Reset the CLI parameters property in the target class object.

Type Parameters
NameDescription
TInteropService
Parameters
NameTypeDescription
inst``0

-

Returns

返回所重置的参数的个数

field convertMethods #
convertMethods

Converts the property value to a CLI token