WindowsRuntimeSystemExtensions WindowsRuntimeSystemExtensions WindowsRuntimeSystemExtensions WindowsRuntimeSystemExtensions Class

Definition

Important

This API is not CLS-compliant.

Provides extension methods for converting between tasks and Windows Runtime asynchronous actions and operations.

public ref class WindowsRuntimeSystemExtensions abstract sealed
[System.CLSCompliant(false)]
[System.Security.SecurityCritical]
public static class WindowsRuntimeSystemExtensions
type WindowsRuntimeSystemExtensions = class
Public Module WindowsRuntimeSystemExtensions
Inheritance
WindowsRuntimeSystemExtensionsWindowsRuntimeSystemExtensionsWindowsRuntimeSystemExtensionsWindowsRuntimeSystemExtensions
Attributes

Remarks

The AsTask extension method overloads enable you to use a .NET Task object to manage an asynchronous operation from the Windows Runtime.

The AsAsyncAction method and the AsAsyncOperation method enable you to pass started tasks to methods that take Windows Runtime asynchronous actions and operations. See also the methods of the AsyncInfo class.

The GetAwaiter methods are used by compilers to implement the operation ( in Visual Basic).

Methods

AsAsyncAction(Task) AsAsyncAction(Task) AsAsyncAction(Task) AsAsyncAction(Task)

Returns a Windows Runtime asynchronous action that represents a started task.

AsAsyncOperation<TResult>(Task<TResult>) AsAsyncOperation<TResult>(Task<TResult>) AsAsyncOperation<TResult>(Task<TResult>) AsAsyncOperation<TResult>(Task<TResult>)

Returns a Windows Runtime asynchronous operation that represents a started task that returns a result.

AsTask(IAsyncAction) AsTask(IAsyncAction) AsTask(IAsyncAction) AsTask(IAsyncAction)

Returns a task that represents a Windows Runtime asynchronous action.

AsTask(IAsyncAction, CancellationToken) AsTask(IAsyncAction, CancellationToken) AsTask(IAsyncAction, CancellationToken) AsTask(IAsyncAction, CancellationToken)

Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.

AsTask<TProgress>(IAsyncActionWithProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>)

Returns a task that represents a Windows Runtime asynchronous action.

AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, IProgress<TProgress>)

Returns a task that represents a Windows Runtime asynchronous action that reports progress.

AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken)

Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.

AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken, IProgress<TProgress>)

Returns a task that represents a Windows Runtime asynchronous action that reports progress and can be cancelled.

AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken, IProgress<TProgress>)

Returns a task that represents a Windows Runtime asynchronous operation that returns a result, reports progress, and can be cancelled.

AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, CancellationToken)

Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.

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

Returns a task that represents a Windows Runtime asynchronous operation returns a result.

AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, IProgress<TProgress>) AsTask<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>, IProgress<TProgress>)

Returns a task that represents Windows Runtime asynchronous operation that returns a result and reports progress.

AsTask<TResult>(IAsyncOperation<TResult>) AsTask<TResult>(IAsyncOperation<TResult>) AsTask<TResult>(IAsyncOperation<TResult>) AsTask<TResult>(IAsyncOperation<TResult>)

Returns a task that represents a Windows Runtime asynchronous operation returns a result.

AsTask<TResult>(IAsyncOperation<TResult>, CancellationToken) AsTask<TResult>(IAsyncOperation<TResult>, CancellationToken) AsTask<TResult>(IAsyncOperation<TResult>, CancellationToken) AsTask<TResult>(IAsyncOperation<TResult>, CancellationToken)

Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.

GetAwaiter(IAsyncAction) GetAwaiter(IAsyncAction) GetAwaiter(IAsyncAction) GetAwaiter(IAsyncAction)

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

GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>) GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>) GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>) GetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>)

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

GetAwaiter<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>) GetAwaiter<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>) GetAwaiter<TResult,TProgress>(IAsyncOperationWithProgress<TResult,TProgress>) 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>) GetAwaiter<TResult>(IAsyncOperation<TResult>) GetAwaiter<TResult>(IAsyncOperation<TResult>) GetAwaiter<TResult>(IAsyncOperation<TResult>)

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

Applies to