Export (0) Print
Expand All

WindowsRuntimeSystemExtensions Class

.NET Framework 4.5

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

This API is not CLS-compliant. 

System.Object
  System.WindowsRuntimeSystemExtensions

Namespace:  System
Assembly:  System.Runtime.WindowsRuntime (in System.Runtime.WindowsRuntime.dll)

[CLSCompliantAttribute(false)]
public static class WindowsRuntimeSystemExtensions

The WindowsRuntimeSystemExtensions type exposes the following members.

  NameDescription
Public methodStatic memberSupported in .NET for Windows Store appsAsAsyncActionReturns a Windows Runtime asynchronous action that represents a started task.
Public methodStatic memberSupported in .NET for Windows Store appsAsAsyncOperation<TResult>Returns a Windows Runtime asynchronous operation that represents a started task that returns a result.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask(IAsyncAction)Returns a task that represents a Windows Runtime asynchronous action.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask(IAsyncAction, CancellationToken)Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TProgress>(IAsyncActionWithProgress<TProgress>)Returns a task that represents a Windows Runtime asynchronous action.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TResult>(IAsyncOperation<TResult>)Returns a task that represents a Windows Runtime asynchronous operation returns a result.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TProgress>(IAsyncActionWithProgress<TProgress>, IProgress<TProgress>)Returns a task that represents a Windows Runtime asynchronous action that reports progress.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken)Returns a task that represents a Windows Runtime asynchronous action that can be cancelled.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TResult>(IAsyncOperation<TResult>, CancellationToken)Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TProgress>(IAsyncActionWithProgress<TProgress>, CancellationToken, IProgress<TProgress>)Returns a task that represents a Windows Runtime asynchronous action that reports progress and can be cancelled.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TResult, TProgress>(IAsyncOperationWithProgress<TResult, TProgress>)Returns a task that represents a Windows Runtime asynchronous operation returns a result.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TResult, TProgress>(IAsyncOperationWithProgress<TResult, TProgress>, IProgress<TProgress>)Returns a task that represents Windows Runtime asynchronous operation that returns a result and reports progress.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<TResult, TProgress>(IAsyncOperationWithProgress<TResult, TProgress>, CancellationToken)Returns a task that represents a Windows Runtime asynchronous operation that returns a result and can be cancelled.
Public methodStatic memberSupported in .NET for Windows Store appsAsTask<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.
Public methodStatic memberSupported in .NET for Windows Store appsGetAwaiter(IAsyncAction)Infrastructure. Returns an object that awaits an asynchronous action.
Public methodStatic memberSupported in .NET for Windows Store appsGetAwaiter<TProgress>(IAsyncActionWithProgress<TProgress>)Infrastructure. Returns an object that awaits an asynchronous action that reports progress.
Public methodStatic memberSupported in .NET for Windows Store appsGetAwaiter<TResult>(IAsyncOperation<TResult>)Infrastructure. Returns an object that awaits an asynchronous operation that returns a result.
Public methodStatic memberSupported in .NET for Windows Store appsGetAwaiter<TResult, TProgress>(IAsyncOperationWithProgress<TResult, TProgress>)Infrastructure. Returns an object that awaits an asynchronous operation that reports progress and returns a result.
Top

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

The AsAsyncAction method and the AsAsyncOperation<TResult> 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 await operation (Await in Visual Basic).

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Store apps

Supported in: Windows 8

Supported in: Windows Phone Silverlight 8

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2014 Microsoft