AsyncLazy<T>.GetValueAsync 메서드

정의

오버로드

GetValueAsync()

값을 생성하거나 생성한 작업을 가져옵니다.

GetValueAsync(CancellationToken)

값을 생성하거나 생성한 작업을 가져옵니다.

GetValueAsync()

값을 생성하거나 생성한 작업을 가져옵니다.

public:
 System::Threading::Tasks::Task<T> ^ GetValueAsync();
public System.Threading.Tasks.Task<T> GetValueAsync ();
member this.GetValueAsync : unit -> System.Threading.Tasks.Task<'T>
Public Function GetValueAsync () As Task(Of T)

반환

Task<T>

결과가 지연 생성 값인 작업입니다.

예외

이 instance 팩터리 값이 호출 GetValueAsync() 되면 throw됩니다.

가 호출된 후에 DisposeValue() throw됩니다.

적용 대상

GetValueAsync(CancellationToken)

값을 생성하거나 생성한 작업을 가져옵니다.

public:
 System::Threading::Tasks::Task<T> ^ GetValueAsync(System::Threading::CancellationToken cancellationToken);
public System.Threading.Tasks.Task<T> GetValueAsync (System.Threading.CancellationToken cancellationToken);
member this.GetValueAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task<'T>
Public Function GetValueAsync (cancellationToken As CancellationToken) As Task(Of T)

매개 변수

cancellationToken
CancellationToken

취소가 호출자가 더 이상 결과에 관심이 없음을 나타내는 토큰입니다. 다른 호출자가 있을 수 있으므로 값 팩터리는 취소되지 않습니다. 그러나 이 토큰은 반환된 작업을 신속하게 취소하고 이 호출의 결과로 발생할 수 있는 작업의 JoinableTask 조인을 취소합니다.

반환

Task<T>

결과가 지연 생성 값인 작업입니다.

예외

이 instance 팩터리 값이 호출 GetValueAsync() 되면 throw됩니다.

가 호출된 후에 DisposeValue() throw됩니다.

적용 대상