Promises.Convert<T, S> Method (IPromise<T>, Action<T, Promise<S>>, Action<Exception, Promise<S>>) |
Convert a promise by modifying the done/fail logic in addition to transforming the type.
Namespace: Innovator.ClientAssembly: Innovator.Client (in Innovator.Client.dll) Version: 2016.1.15.1759 (2016.01.15.1759)
Syntaxpublic static IPromise<S> Convert<T, S>(
this IPromise<T> promise,
Action<T, Promise<S>> doneCallback,
Action<Exception, Promise<S>> failCallback
)
<ExtensionAttribute>
Public Shared Function Convert(Of T, S) (
promise As IPromise(Of T),
doneCallback As Action(Of T, Promise(Of S)),
failCallback As Action(Of Exception, Promise(Of S))
) As IPromise(Of S)
Parameters
- promise
- Type: Innovator.Client.IPromise<T>
- doneCallback
- Type: System.Action<T, Promise<S>>
- failCallback
- Type: System.Action<Exception, Promise<S>>
Type Parameters
- T
- S
Return Value
Type:
IPromise<S>Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
IPromise<T>. 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