WindowsRuntimeSystemExtensions.GetAwaiter Method

Definition

Overloads

GetAwaiter(IAsyncAction)

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>)

Returns an object that awaits an asynchronous action that reports progress.

GetAwaiter<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>)

Returns an object that awaits an asynchronous operation that reports progress and returns a result.

GetAwaiter<TResult>(IAsyncOperation<TResult>)

Returns an object that awaits an asynchronous operation that returns a result.

GetAwaiter(IAsyncAction)

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Runtime::CompilerServices::TaskAwaiter GetAwaiter(Windows::Foundation::IAsyncAction ^ source);
public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter (this Windows.Foundation.IAsyncAction source);
static member GetAwaiter : Windows.Foundation.IAsyncAction -> System.Runtime.CompilerServices.TaskAwaiter
<Extension()>
Public Function GetAwaiter (source As IAsyncAction) As TaskAwaiter

Parameters

source
IAsyncAction

The asynchronous action to await.

Returns

An object that awaits the specified asynchronous action.

Remarks

Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncAction. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Applies to

GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>)

Returns an object that awaits an asynchronous action that reports progress.

public:
generic <typename TProgress>
[System::Runtime::CompilerServices::Extension]
 static System::Runtime::CompilerServices::TaskAwaiter GetAwaiter(Windows::Foundation::IAsyncActionWithProgress<TProgress> ^ source);
public static System.Runtime.CompilerServices.TaskAwaiter GetAwaiter<TProgress> (this Windows.Foundation.IAsyncActionWithProgress<TProgress> source);
static member GetAwaiter : Windows.Foundation.IAsyncActionWithProgress<'Progress> -> System.Runtime.CompilerServices.TaskAwaiter
<Extension()>
Public Function GetAwaiter(Of TProgress) (source As IAsyncActionWithProgress(Of TProgress)) As TaskAwaiter

Type Parameters

TProgress

The type of object that provides data that indicates progress.

Parameters

source
IAsyncActionWithProgress<TProgress>

The asynchronous action to await.

Returns

An object that awaits the specified asynchronous action.

Remarks

Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncActionWithProgress<TProgress>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Applies to

GetAwaiter<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>)

Returns an object that awaits an asynchronous operation that reports progress and returns a result.

public:
generic <typename TResult, typename TProgress>
[System::Runtime::CompilerServices::Extension]
 static System::Runtime::CompilerServices::TaskAwaiter<TResult> GetAwaiter(Windows::Foundation::IAsyncOperationWithProgress<TResult, TProgress> ^ source);
public static System.Runtime.CompilerServices.TaskAwaiter<TResult> GetAwaiter<TResult,TProgress> (this Windows.Foundation.IAsyncOperationWithProgress<TResult,TProgress> source);
static member GetAwaiter : Windows.Foundation.IAsyncOperationWithProgress<'Result, 'Progress> -> System.Runtime.CompilerServices.TaskAwaiter<'Result>
<Extension()>
Public Function GetAwaiter(Of TResult, TProgress) (source As IAsyncOperationWithProgress(Of TResult, TProgress)) As TaskAwaiter(Of TResult)

Type Parameters

TResult

The type of object that returns the result of the asynchronous operation.

TProgress

The type of object that provides data that indicates progress.

Parameters

source
IAsyncOperationWithProgress<TResult,TProgress>

The asynchronous operation to await.

Returns

An object that awaits the specified asynchronous operation.

Remarks

Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncOperationWithProgress<TResult,TProgress>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Applies to

GetAwaiter<TResult>(IAsyncOperation<TResult>)

Returns an object that awaits an asynchronous operation that returns a result.

public:
generic <typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Runtime::CompilerServices::TaskAwaiter<TResult> GetAwaiter(Windows::Foundation::IAsyncOperation<TResult> ^ source);
public static System.Runtime.CompilerServices.TaskAwaiter<TResult> GetAwaiter<TResult> (this Windows.Foundation.IAsyncOperation<TResult> source);
static member GetAwaiter : Windows.Foundation.IAsyncOperation<'Result> -> System.Runtime.CompilerServices.TaskAwaiter<'Result>
<Extension()>
Public Function GetAwaiter(Of TResult) (source As IAsyncOperation(Of TResult)) As TaskAwaiter(Of TResult)

Type Parameters

TResult

The type of object that returns the result of the asynchronous operation.

Parameters

source
IAsyncOperation<TResult>

The asynchronous operation to await.

Returns

An object that awaits the specified asynchronous operation.

Remarks

Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IAsyncOperation<TResult>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Applies to