##// END OF EJS Templates
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.
fixed promise chaining behavior, the error handler doesn't handle result or cancellation handlers exceptions these exceptions are propagated to the next handlers.

File last commit:

r151:ec91a6dfa5b3 v2
r196:40d7fed4a09e default
Show More
IPromise.cs
66 lines | 2.8 KiB | text/x-csharp | CSharpLexer
cin
inital progress handling
r7 using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
cin
Refactoring
r66 namespace Implab {
public interface IPromise: ICancellable {
cin
refactoring
r26
cin
Refactoring
r66 /// <summary>
/// Тип результата, получаемого через данное обещание.
/// </summary>
Type PromiseType { get; }
cin
refactoring
r25
cin
minor fixes
r74 /// <summary>
cin
fixed TransientPromiseException handling
r99 /// Обещание является выполненым, либо успешно, либо с ошибкой, либо отменено.
cin
minor fixes
r74 /// </summary>
cin
Refactoring
r66 bool IsResolved { get; }
cin
minor fixes
r74 /// <summary>
/// Обещание было отменено.
/// </summary>
cin
Refactoring
r66 bool IsCancelled { get; }
cin
refactoring
r25
cin
Promises rewritten, added improved version of AsyncQueue
r119 /// <summary>
cin
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
r138 /// Исключение возникшее в результате выполнения обещания, либо причина отмены.
/// </summary>
Exception Error { get; }
/// <summary>
cin
Promises rewritten, added improved version of AsyncQueue
r119 /// Adds specified listeners to the current promise.
cin
major refactoring, added tasks support
r75 /// </summary>
cin
Promises rewritten, added improved version of AsyncQueue
r119 /// <param name="success">The handler called on the successful promise completion.</param>
/// <param name="error">The handler is called if an error while completing the promise occurred.</param>
/// <param name="cancel">The handler is called in case of promise cancellation.</param>
/// <returns>The current promise.</returns>
cin
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
r138 IPromise On(Action success, Action<Exception> error, Action<Exception> cancel);
cin
Promises rewritten, added improved version of AsyncQueue
r119 IPromise On(Action success, Action<Exception> error);
IPromise On(Action success);
cin
major refactoring, added tasks support
r75
cin
minor fixes
r74 /// <summary>
cin
Promises rewritten, added improved version of AsyncQueue
r119 /// Adds specified listeners to the current promise.
/// </summary>
/// <param name="handler">The handler called on the specified events.</param>
/// <param name = "events">The combination of flags denoting the events for which the
/// handler shoud be called.</param>
/// <returns>The current promise.</returns>
IPromise On(Action handler, PromiseEventType events);
/// <summary>
cin
minor fixes
r74 /// Преобразует результат обещания к заданному типу и возвращает новое обещание.
/// </summary>
cin
Refactoring
r66 IPromise<T> Cast<T>();
cin
refactoring
r26
cin
minor fixes
r74 /// <summary>
/// Синхронизирует текущий поток с обещанием.
/// </summary>
cin
Refactoring
r66 void Join();
cin
minor fixes
r74 /// <summary>
/// Синхронизирует текущий поток с обещанием.
/// </summary>
/// <param name="timeout">Время ожидания, по его истечению возникнет исключение.</param>
/// <exception cref="TimeoutException">Превышено время ожидания.</exception>
cin
Refactoring
r66 void Join(int timeout);
cin
inital progress handling
r7
}
}