다음을 통해 공유


TestingUtils.WithTimeout(Task, TimeSpan, String) 메서드

정의

지정된 시간 안에 작업을 완료해 보세요.

public static System.Threading.Tasks.Task WithTimeout (this System.Threading.Tasks.Task taskToComplete, TimeSpan timeout, string message);
static member WithTimeout : System.Threading.Tasks.Task * TimeSpan * string -> System.Threading.Tasks.Task
<Extension()>
Public Function WithTimeout (taskToComplete As Task, timeout As TimeSpan, message As String) As Task

매개 변수

taskToComplete
Task

실행할 작업

timeout
TimeSpan

시간 제한 값

message
String

지정된 시간에 작업이 완료되지 않은 경우 TimeoutException에 넣을 메시지입니다.

반환

예외

지정된 시간에 작업이 완료되지 않은 경우

적용 대상