##// END OF EJS Templates
added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()'...
added Safe.DispatchEvent() a legacy equivalent for '?.Invoke()' added Safe.Dispose(IEnumerable) added PromiseExtensions.CancellationPoint to add a cancellation point to the chain of promises added IPromise<T> PromiseExtensions.Then<T>(this IPromise<T> that, Action<T> success) overloads added PromiseExtensions.Error() overloads to handle a error or(and) a cancellation

File last commit:

r205:8200ab154c8a v2
r207:558f34b2fb50 v2
Show More
IRunnable.cs
22 lines | 556 B | text/x-csharp | CSharpLexer
using System;
namespace Implab.Components {
public interface IRunnable {
/// <summary>
/// Starts this instance.
/// </summary>
IPromise Start();
/// <summary>
/// Stops this instance. After the instance is stopped it can't be started again, stopping should be treated as gracefull and async dispose.
/// </summary>
IPromise Stop();
ExecutionState State { get; }
event EventHandler<StateChangeEventArgs> StateChanged;
Exception LastError { get; }
}
}