다음을 통해 공유


ParseResultExtensions.InvokeAsync(ParseResult, IConsole) 메서드

정의

구문 분석된 명령줄 입력에 적절한 명령 처리기를 호출합니다.

public static System.Threading.Tasks.Task<int> InvokeAsync (this System.CommandLine.Parsing.ParseResult parseResult, System.CommandLine.IConsole? console = default);
static member InvokeAsync : System.CommandLine.Parsing.ParseResult * System.CommandLine.IConsole -> System.Threading.Tasks.Task<int>
<Extension()>
Public Function InvokeAsync (parseResult As ParseResult, Optional console As IConsole = Nothing) As Task(Of Integer)

매개 변수

parseResult
ParseResult

호출의 기반이 되는 구문 분석 결과입니다.

console
IConsole

출력을 쓸 수 있는 콘솔입니다. 기본적으로 Console가 사용됩니다.

반환

결과를 프로세스 종료 코드로 사용할 수 있는 작업입니다.

설명

이 메서드는 메서드의 동기 대응에서 throw할 수 있는 모든 비사용 예외를 반환하는 작업에 저장됩니다. 예외가 반환된 작업에 저장되면 작업이 대기될 때 해당 예외가 throw됩니다. 와 같은 ArgumentException사용 예외는 여전히 동기적으로 throw됩니다. 저장된 예외는 에서 throw Invoke(ParseResult, IConsole)된 예외를 참조하세요.

적용 대상