IRunnable.cs
22 lines
| 556 B
| text/x-csharp
|
CSharpLexer
cin
|
r152 | using System; | ||
namespace Implab.Components { | ||||
public interface IRunnable { | ||||
cin
|
r203 | /// <summary> | ||
/// Starts this instance. | ||||
/// </summary> | ||||
cin
|
r152 | IPromise Start(); | ||
cin
|
r203 | /// <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> | ||||
cin
|
r152 | IPromise Stop(); | ||
ExecutionState State { get; } | ||||
cin
|
r205 | event EventHandler<StateChangeEventArgs> StateChanged; | ||
cin
|
r152 | Exception LastError { get; } | ||
} | ||||
} | ||||