Mercurial > pub > ImplabNet
annotate Implab/Components/IRunnable.cs @ 203:4d9830a9bbb8 v2
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.
author | cin |
---|---|
date | Tue, 18 Oct 2016 17:49:54 +0300 |
parents | 240aa6994018 |
children | 8200ab154c8a |
rev | line source |
---|---|
152 | 1 using System; |
2 | |
3 namespace Implab.Components { | |
4 public interface IRunnable { | |
203
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
5 /// <summary> |
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
6 /// Starts this instance. |
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
7 /// </summary> |
152 | 8 IPromise Start(); |
9 | |
203
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
10 /// <summary> |
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
11 /// Stops this instance. After the instance is stopped it can't be started again, stopping should be treated as gracefull and async dispose. |
4d9830a9bbb8
Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents:
152
diff
changeset
|
12 /// </summary> |
152 | 13 IPromise Stop(); |
14 | |
15 ExecutionState State { get; } | |
16 | |
17 Exception LastError { get; } | |
18 } | |
19 } | |
20 |