IPromise.cs
37 lines
| 991 B
| text/x-csharp
|
CSharpLexer
/ Implab / IPromise.cs
|
|
r7 | using System; | ||
| using System.Collections.Generic; | ||||
| using System.Linq; | ||||
| using System.Text; | ||||
|
|
r66 | namespace Implab { | ||
| public interface IPromise: ICancellable { | ||||
| /// <summary> | ||||
| /// Check whereather the promise has no more than one dependent promise. | ||||
| /// </summary> | ||||
| bool IsExclusive { | ||||
| get; | ||||
| } | ||||
|
|
r26 | |||
|
|
r66 | /// <summary> | ||
| /// Тип результата, получаемого через данное обещание. | ||||
| /// </summary> | ||||
| Type PromiseType { get; } | ||||
|
|
r25 | |||
|
|
r66 | bool IsResolved { get; } | ||
| bool IsCancelled { get; } | ||||
|
|
r25 | |||
|
|
r66 | IPromise Then(Action success,ErrorHandler error); | ||
| IPromise Then(Action success); | ||||
| IPromise Error(ErrorHandler error); | ||||
| IPromise Anyway(Action handler); | ||||
| IPromise Finally(Action handler); | ||||
| IPromise Cancelled(Action handler); | ||||
|
|
r7 | |||
|
|
r66 | IPromise<T> Cast<T>(); | ||
|
|
r26 | |||
|
|
r66 | void Join(); | ||
| void Join(int timeout); | ||||
|
|
r7 | |||
| } | ||||
| } | ||||
