Click or drag to resize
PromisesToPromiseT Method
Convert a .Net 4.0 Task to a promise

Namespace: Innovator.Client
Assembly: Innovator.Client (in Innovator.Client.dll) Version: 2016.1.15.1759 (2016.01.15.1759)
Syntax
public static IPromise<T> ToPromise<T>(
	this Task<T> task,
	CancellationTokenSource cts = null
)

Parameters

task
Type: System.Threading.TasksTaskT
cts (Optional)
Type: System.ThreadingCancellationTokenSource

Type Parameters

T

Return Value

Type: IPromiseT

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type TaskT. 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).
See Also