다음을 통해 공유


Option 생성자

정의

오버로드

Option(String, String, Type, Func<Object>, ArgumentArity)

Option 클래스의 새 인스턴스를 초기화합니다.

Option(String[], String, Type, Func<Object>, ArgumentArity)

Option 클래스의 새 인스턴스를 초기화합니다.

Option(String, String, Type, Func<Object>, ArgumentArity)

Option 클래스의 새 인스턴스를 초기화합니다.

public Option (string name, string? description = default, Type? argumentType = default, Func<object?>? getDefaultValue = default, System.CommandLine.ArgumentArity arity = default);
new System.CommandLine.Option : string * string * Type * Func<obj> * System.CommandLine.ArgumentArity -> System.CommandLine.Option
Public Sub New (name As String, Optional description As String = Nothing, Optional argumentType As Type = Nothing, Optional getDefaultValue As Func(Of Object) = Nothing, Optional arity As ArgumentArity = Nothing)

매개 변수

name
String

명령줄에서 지정하는 데 사용할 수 있는 옵션의 이름입니다.

description
String

도움말에 표시된 옵션에 대한 설명입니다.

argumentType
Type

옵션의 인수를 구문 분석할 수 있는 형식입니다.

getDefaultValue
Func<Object>

명령줄에 지정되지 않은 경우 옵션의 기본값을 가져오는 데 사용되는 대리자입니다.

arity
ArgumentArity

옵션의 약성입니다.

적용 대상

Option(String[], String, Type, Func<Object>, ArgumentArity)

Option 클래스의 새 인스턴스를 초기화합니다.

public Option (string[] aliases, string? description = default, Type? argumentType = default, Func<object?>? getDefaultValue = default, System.CommandLine.ArgumentArity arity = default);
new System.CommandLine.Option : string[] * string * Type * Func<obj> * System.CommandLine.ArgumentArity -> System.CommandLine.Option
Public Sub New (aliases As String(), Optional description As String = Nothing, Optional argumentType As Type = Nothing, Optional getDefaultValue As Func(Of Object) = Nothing, Optional arity As ArgumentArity = Nothing)

매개 변수

aliases
String[]

명령줄에서 옵션을 지정하는 데 사용할 수 있는 문자열 집합입니다.

description
String

도움말에 표시된 옵션에 대한 설명입니다.

argumentType
Type

옵션의 인수를 구문 분석할 수 있는 형식입니다.

getDefaultValue
Func<Object>

명령줄에 지정되지 않은 경우 옵션의 기본값을 가져오는 데 사용되는 대리자입니다.

arity
ArgumentArity

옵션의 약성입니다.

적용 대상