C# Class UnifiedStorage.Extensions.AwaitExtensions

Extensions for working with the task asynchronous pattern (async/await).
Exibir arquivo Open project: fiveninedigital/UnifiedStorage

Public Methods

Method Description
SwitchOffMainThreadAsync ( CancellationToken cancellationToken ) : TaskSchedulerAwaiter

Causes the caller who awaits this method to switch off the Main thread. It has no effect if the caller is already off the main thread.

Method Details

SwitchOffMainThreadAsync() public static method

Causes the caller who awaits this method to switch off the Main thread. It has no effect if the caller is already off the main thread.
public static SwitchOffMainThreadAsync ( CancellationToken cancellationToken ) : TaskSchedulerAwaiter
cancellationToken System.Threading.CancellationToken The cancellation token.
return TaskSchedulerAwaiter