Windows Dev Center

AsyncInfo Class

For apps that target Windows Phone OS 7.0 and 7.1, do not use any members of this type in your app. If you do, your code will throw a MethodAccessException. This type is security-critical, which restricts it to internal use by the .NET Framework for Windows Phone class library.
[SECURITY CRITICAL]

Provides factory methods to construct representations of managed tasks that are compatible with Windows Runtime asynchronous actions and operations.

This API is not CLS-compliant. 

System.Object
  System.Runtime.InteropServices.WindowsRuntime.AsyncInfo

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

[SecurityCriticalAttribute]
[CLSCompliantAttribute(false)]
public static class AsyncInfo

  NameDescription
Public methodStatic memberRun(Func<CancellationToken, Task>)Creates and starts a Windows Runtime asynchronous action by using a function that generates a started task. The task can support cancellation.
Public methodStatic memberRun<TResult>(Func<CancellationToken, Task<TResult>>)Creates and starts a Windows Runtime asynchronous operation by using a function that generates a started task that returns results. The task can support cancellation.
Public methodStatic memberRun<TProgress>(Func<CancellationToken, IProgress<TProgress>, Task>)Creates and starts a Windows Runtime asynchronous action that includes progress updates, by using a function that generates a started task. The task can support cancellation and progress reporting.
Public methodStatic memberRun<TResult, TProgress>(Func<CancellationToken, IProgress<TProgress>, Task<TResult>>)Creates and starts a Windows Runtime asynchronous operation that includes progress updates, by using a function that generates a started task that returns results. The task can support cancellation and progress reporting.
Top

Windows Phone OS

Supported in: 8.1, 8.0

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:
© 2015 Microsoft