Show / Hide Table of Contents

Class PromiseExtensions

Promise extensions for IAsyncOperation.

Inheritance
Object
PromiseExtensions
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: UnityFx.Async.Promises
Assembly: UnityFx.Async-netstandard2.0.dll
Syntax
public static class PromiseExtensions

Methods

| Improve this Doc View Source

Catch(IAsyncOperation, Action<Exception>)

Schedules a callback to be executed after the promise has been rejected.

Declaration
public static IAsyncOperation Catch(this IAsyncOperation op, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Action<Exception> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
Catch<TException>(IAsyncOperation, Action<TException>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Catch<TException>(IAsyncOperation, Action<TException>)

Schedules a callback to be executed after the promise has been rejected.

Declaration
public static IAsyncOperation Catch<TException>(this IAsyncOperation op, Action<TException> errorCallback)where TException : Exception
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Action<TException> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TException
See Also
Catch(IAsyncOperation, Action<Exception>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Done(IAsyncOperation)

Routes unhendled errors to UnhandledException.

Declaration
public static void Done(this IAsyncOperation op)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

See Also
UnhandledException
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Done(IAsyncOperation, Action)

Schedules a callback to be executed after the promise chain has completed. Routes unhendled errors to UnhandledException.

Declaration
public static void Done(this IAsyncOperation op, Action successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

Action successCallback

The callback to be executed when the promise has resolved.

See Also
Done(IAsyncOperation, Action, Action<Exception>)
UnhandledException
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Done(IAsyncOperation, Action, Action<Exception>)

Schedules a callback to be executed after the promise chain has completed. Routes unhendled errors to UnhandledException.

Declaration
public static void Done(this IAsyncOperation op, Action successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

Action successCallback

The callback to be executed when the promise has resolved.

System.Action<Exception> errorCallback

The callback to be executed when the promise was rejected.

See Also
Done(IAsyncOperation, Action)
UnhandledException
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Done<TResult>(IAsyncOperation<TResult>, Action<TResult>)

Schedules a callback to be executed after the promise chain has completed. Routes unhendled errors to UnhandledException.

Declaration
public static void Done<TResult>(this IAsyncOperation<TResult> op, Action<TResult> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Action<TResult> successCallback

The callback to be executed when the promise has resolved.

Type Parameters
Name Description
TResult
See Also
Done<TResult>(IAsyncOperation<TResult>, Action<TResult>, Action<Exception>)
UnhandledException
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Done<TResult>(IAsyncOperation<TResult>, Action<TResult>, Action<Exception>)

Schedules a callback to be executed after the promise chain has completed. Routes unhendled errors to UnhandledException.

Declaration
public static void Done<TResult>(this IAsyncOperation<TResult> op, Action<TResult> successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Action<TResult> successCallback

The callback to be executed when the promise has resolved.

System.Action<Exception> errorCallback

The callback to be executed when the promise was rejected.

Type Parameters
Name Description
TResult
See Also
Done<TResult>(IAsyncOperation<TResult>, Action<TResult>)
UnhandledException
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Finally(IAsyncOperation, Action)

Schedules a callback to be executed after the promise has completed.

Declaration
public static IAsyncOperation Finally(this IAsyncOperation op, Action action)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

Action action

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Rebind<TResult>(IAsyncOperation, Func<TResult>)

Transforms the promise result to another type.

Declaration
public static IAsyncOperation<TResult> Rebind<TResult>(this IAsyncOperation op, Func<TResult> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<TResult> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TResult>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
See Also
Rebind<TResult, TNewResult>(IAsyncOperation<TResult>, Func<TResult, TNewResult>)
| Improve this Doc View Source

Rebind<TResult, TNewResult>(IAsyncOperation<TResult>, Func<TResult, TNewResult>)

Transforms the promise result to another type.

Declaration
public static IAsyncOperation<TNewResult> Rebind<TResult, TNewResult>(this IAsyncOperation<TResult> op, Func<TResult, TNewResult> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<TResult, TNewResult> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TNewResult>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
TNewResult
See Also
Rebind<TResult>(IAsyncOperation, Func<TResult>)
| Improve this Doc View Source

Then(IAsyncOperation, Action)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation Then(this IAsyncOperation op, Action successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

Action successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
Then<TResult>(IAsyncOperation<TResult>, Action<TResult>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then(IAsyncOperation, Action, Action<Exception>)

Schedules a callbacks to be executed after the operation has been resolved.

Declaration
public static IAsyncOperation Then(this IAsyncOperation op, Action successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

Action successCallback

The callback to be executed when the operation has succeeded.

System.Action<Exception> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
Then<TResult>(IAsyncOperation<TResult>, Action<TResult>, Action<Exception>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then(IAsyncOperation, Func<IAsyncOperation>)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation Then(this IAsyncOperation op, Func<IAsyncOperation> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<IAsyncOperation> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

See Also
Then<TResult>(IAsyncOperation, Func<IAsyncOperation<TResult>>)
Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then(IAsyncOperation, Func<IAsyncOperation>, Action<Exception>)

Schedules a callbacks to be executed after the operation has been resolved.

Declaration
public static IAsyncOperation Then(this IAsyncOperation op, Func<IAsyncOperation> successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<IAsyncOperation> successCallback

The callback to be executed when the operation has succeeded.

System.Action<Exception> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

See Also
Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult>(IAsyncOperation, Func<IAsyncOperation<TResult>>)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation<TResult> Then<TResult>(this IAsyncOperation op, Func<IAsyncOperation<TResult>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<IAsyncOperation<TResult>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TResult>

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

Type Parameters
Name Description
TResult
See Also
Then(IAsyncOperation, Func<IAsyncOperation>)
Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult>(IAsyncOperation<TResult>, Action<TResult>)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation Then<TResult>(this IAsyncOperation<TResult> op, Action<TResult> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Action<TResult> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
See Also
Then(IAsyncOperation, Action)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult>(IAsyncOperation<TResult>, Action<TResult>, Action<Exception>)

Schedules a callbacks to be executed after the operation has been resolved.

Declaration
public static IAsyncOperation Then<TResult>(this IAsyncOperation<TResult> op, Action<TResult> successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Action<TResult> successCallback

The callback to be executed when the operation has succeeded.

System.Action<Exception> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
See Also
Then(IAsyncOperation, Action, Action<Exception>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation Then<TResult>(this IAsyncOperation<TResult> op, Func<TResult, IAsyncOperation> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<TResult, IAsyncOperation> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

Type Parameters
Name Description
TResult
See Also
Then(IAsyncOperation, Func<IAsyncOperation>)
Then<TResult>(IAsyncOperation, Func<IAsyncOperation<TResult>>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>, Action<Exception>)

Schedules a callbacks to be executed after the operation has been resolved.

Declaration
public static IAsyncOperation Then<TResult>(this IAsyncOperation<TResult> op, Func<TResult, IAsyncOperation> successCallback, Action<Exception> errorCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<TResult, IAsyncOperation> successCallback

The callback to be executed when the operation has succeeded.

System.Action<Exception> errorCallback

The callback to be executed when the operation has faulted/was canceled.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

Type Parameters
Name Description
TResult
See Also
Then(IAsyncOperation, Func<IAsyncOperation>, Action<Exception>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

Then<TResult, TNewResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation<TNewResult>>)

Schedules a callback to be executed after the promise has been resolved.

Declaration
public static IAsyncOperation<TNewResult> Then<TResult, TNewResult>(this IAsyncOperation<TResult> op, Func<TResult, IAsyncOperation<TNewResult>> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<TResult, IAsyncOperation<TNewResult>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TNewResult>

Returns a continuation operation that completes after both source operation and the operation returned by successCallback has completed.

Type Parameters
Name Description
TResult
TNewResult
See Also
Then(IAsyncOperation, Func<IAsyncOperation>)
Then<TResult>(IAsyncOperation, Func<IAsyncOperation<TResult>>)
Then<TResult>(IAsyncOperation<TResult>, Func<TResult, IAsyncOperation>)
https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise
| Improve this Doc View Source

ThenAll(IAsyncOperation, Func<IEnumerable<IAsyncOperation>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation ThenAll(this IAsyncOperation op, Func<IEnumerable<IAsyncOperation>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<IAsyncOperation>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
ThenAll<T>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation>>)
| Improve this Doc View Source

ThenAll<T>(IAsyncOperation, Func<IEnumerable<IAsyncOperation<T>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation<T[]> ThenAll<T>(this IAsyncOperation op, Func<IEnumerable<IAsyncOperation<T>>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<IAsyncOperation<T>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<T[]>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
T
See Also
ThenAll<T, U>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation<U>>>)
| Improve this Doc View Source

ThenAll<T>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation ThenAll<T>(this IAsyncOperation<T> op, Func<T, IEnumerable<IAsyncOperation>> successCallback)
Parameters
Type Name Description
IAsyncOperation<T> op

An operation to be continued.

System.Func<T, System.Collections.Generic.IEnumerable<IAsyncOperation>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
T
See Also
ThenAll(IAsyncOperation, Func<IEnumerable<IAsyncOperation>>)
| Improve this Doc View Source

ThenAll<T, U>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation<U>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the specified objects in an array have completed.

Declaration
public static IAsyncOperation<U[]> ThenAll<T, U>(this IAsyncOperation<T> op, Func<T, IEnumerable<IAsyncOperation<U>>> successCallback)
Parameters
Type Name Description
IAsyncOperation<T> op

An operation to be continued.

System.Func<T, System.Collections.Generic.IEnumerable<IAsyncOperation<U>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<U[]>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
T
U
See Also
ThenAll<T>(IAsyncOperation, Func<IEnumerable<IAsyncOperation<T>>>)
| Improve this Doc View Source

ThenAny(IAsyncOperation, Func<IEnumerable<IAsyncOperation>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after any of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation ThenAny(this IAsyncOperation op, Func<IEnumerable<IAsyncOperation>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<IAsyncOperation>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

See Also
ThenAny<TResult>(IAsyncOperation<TResult>, Func<TResult, IEnumerable<IAsyncOperation>>)
| Improve this Doc View Source

ThenAny<TResult>(IAsyncOperation, Func<IEnumerable<IAsyncOperation<TResult>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after any of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation<TResult> ThenAny<TResult>(this IAsyncOperation op, Func<IEnumerable<IAsyncOperation<TResult>>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<IAsyncOperation<TResult>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TResult>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
See Also
ThenAny<T, TResult>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation<TResult>>>)
| Improve this Doc View Source

ThenAny<TResult>(IAsyncOperation<TResult>, Func<TResult, IEnumerable<IAsyncOperation>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after any of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation ThenAny<TResult>(this IAsyncOperation<TResult> op, Func<TResult, IEnumerable<IAsyncOperation>> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<TResult, System.Collections.Generic.IEnumerable<IAsyncOperation>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
See Also
ThenAny(IAsyncOperation, Func<IEnumerable<IAsyncOperation>>)
| Improve this Doc View Source

ThenAny<T, TResult>(IAsyncOperation<T>, Func<T, IEnumerable<IAsyncOperation<TResult>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after any of the operations in the callback return value have completed.

Declaration
public static IAsyncOperation<TResult> ThenAny<T, TResult>(this IAsyncOperation<T> op, Func<T, IEnumerable<IAsyncOperation<TResult>>> successCallback)
Parameters
Type Name Description
IAsyncOperation<T> op

An operation to be continued.

System.Func<T, System.Collections.Generic.IEnumerable<IAsyncOperation<TResult>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation<TResult>

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
T
TResult
See Also
ThenAny<TResult>(IAsyncOperation, Func<IEnumerable<IAsyncOperation<TResult>>>)
| Improve this Doc View Source

ThenSequence(IAsyncOperation, Func<IEnumerable<Func<IAsyncOperation>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback have completed.

Declaration
public static IAsyncOperation ThenSequence(this IAsyncOperation op, Func<IEnumerable<Func<IAsyncOperation>>> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<System.Func<IAsyncOperation>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

| Improve this Doc View Source

ThenSequence(IAsyncOperation, Func<Func<IAsyncOperation>[]>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback have completed.

Declaration
public static IAsyncOperation ThenSequence(this IAsyncOperation op, Func<Func<IAsyncOperation>[]> successCallback)
Parameters
Type Name Description
IAsyncOperation op

An operation to be continued.

System.Func<System.Func<IAsyncOperation>[]> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

| Improve this Doc View Source

ThenSequence<TResult>(IAsyncOperation<TResult>, Func<IEnumerable<Func<IAsyncOperation>>>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback have completed.

Declaration
public static IAsyncOperation ThenSequence<TResult>(this IAsyncOperation<TResult> op, Func<IEnumerable<Func<IAsyncOperation>>> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<System.Collections.Generic.IEnumerable<System.Func<IAsyncOperation>>> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
| Improve this Doc View Source

ThenSequence<TResult>(IAsyncOperation<TResult>, Func<Func<IAsyncOperation>[]>)

Schedules a callback to be executed after the promise has been resolved. The resulting operation will complete after all of the operations in the callback have completed.

Declaration
public static IAsyncOperation ThenSequence<TResult>(this IAsyncOperation<TResult> op, Func<Func<IAsyncOperation>[]> successCallback)
Parameters
Type Name Description
IAsyncOperation<TResult> op

An operation to be continued.

System.Func<System.Func<IAsyncOperation>[]> successCallback

The callback to be executed when the operation has completed.

Returns
Type Description
IAsyncOperation

Returns a continuation operation that completes after both source operation and the callback has completed.

Type Parameters
Name Description
TResult
  • Improve this Doc
  • View Source
Back to top Copyright (c) 2017-2018 Alexander Bogarsukov