##// END OF EJS Templates
Added 'Fail' method to RunnableComponent which allows component to move from...
Added 'Fail' method to RunnableComponent which allows component to move from Running to Failed state. Added PollingComponent a timer based runnable component More tests Added FailPromise a thin class to wrap exceptions Fixed error handling in SuccessPromise classes.

File last commit:

r145:706fccb85524 v2
r203:4d9830a9bbb8 v2
Show More
IDeferred.cs
24 lines | 888 B | text/x-csharp | CSharpLexer
cin
Promises rewritten, added improved version of AsyncQueue
r119 using System;
namespace Implab {
/// <summary>
/// Deferred result, usually used by asynchronous services as the service part of the promise.
/// </summary>
cin
RC: cancellation support for promises + tests
r145 public interface IDeferred : ICancellationToken {
cin
Promises rewritten, added improved version of AsyncQueue
r119
void Resolve();
cin
added ICancellable.Cancel(Exception) to allow specify the reason of cancellation
r138 /// <summary>
/// Reject the promise with the specified error.
/// </summary>
/// <param name="error">The reason why the promise is rejected.</param>
/// <remarks>
/// Some exceptions are treated in a special case:
/// <see cref="OperationCanceledException"/> is interpreted as call to <see cref="Cancel()"/> method,
/// and <see cref="PromiseTransientException"/> is always unwrapped and its
/// <see cref="PromiseTransientException.InnerException"> is used as the reason to reject promise.
/// </remarks>
cin
Promises rewritten, added improved version of AsyncQueue
r119 void Reject(Exception error);
}
}