IPromise.cs
32 lines
| 973 B
| text/x-csharp
|
CSharpLexer
/ Implab / IPromise.cs
cin
|
r7 | using System; | ||
using System.Collections.Generic; | ||||
using System.Linq; | ||||
using System.Text; | ||||
namespace Implab | ||||
{ | ||||
cin
|
r25 | public interface IPromise<T>: IPromiseBase | ||
cin
|
r7 | { | ||
cin
|
r26 | |||
T Join(); | ||||
T Join(int timeout); | ||||
cin
|
r25 | |||
cin
|
r26 | IPromise<T> Then(ResultHandler<T> success, ErrorHandler error); | ||
IPromise<T> Then(ResultHandler<T> success, ErrorHandler<T> error); | ||||
IPromise<T> Then(ResultHandler<T> success); | ||||
IPromise<T> Error(ErrorHandler error); | ||||
IPromise<T> Error(ErrorHandler<T> error); | ||||
cin
|
r25 | |||
cin
|
r26 | IPromise<T2> Map<T2>(ResultMapper<T,T2> mapper, ErrorHandler error); | ||
IPromise<T2> Map<T2>(ResultMapper<T, T2> mapper); | ||||
cin
|
r7 | |||
cin
|
r26 | IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained, ErrorHandler error); | ||
IPromise<T2> Chain<T2>(ChainedOperation<T, T2> chained); | ||||
IPromise<T> Cancelled(Action handler); | ||||
IPromise<T> Finally(Action handler); | ||||
IPromise<T> Anyway(Action handler); | ||||
cin
|
r7 | |||
} | ||||
} | ||||