annotate Implab/Components/IRunnable.cs @ 228:6fa235c5a760 v2

Rewritten JsonScanner, JsonParser, fixed naming style
author cin
date Tue, 12 Sep 2017 01:19:12 +0300
parents 7d07503621fe
children 9f63dade3a40
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
1 using System;
240aa6994018 component model refactoring
cin
parents:
diff changeset
2
240aa6994018 component model refactoring
cin
parents:
diff changeset
3 namespace Implab.Components {
208
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
4 /// <summary>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
5 /// Interface for the component which performs a long running task.
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
6 /// </summary>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
7 /// <remarks>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
8 /// <para>The component also should implement <see cref="IDisposable"/> interface to be able to release used resources.</para>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
9 /// <para>All methods of this interface must be a thread safe. If the operation is not applicable in the current state the
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
10 /// method should throw an exception and keep the current state unchanged.</para>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
11 /// </remarks>
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
12 public interface IRunnable : IDisposable {
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 152
diff changeset
13 /// <summary>
208
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
14 /// Starts this instance
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 152
diff changeset
15 /// </summary>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
16 IPromise Start();
240aa6994018 component model refactoring
cin
parents:
diff changeset
17
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 152
diff changeset
18 /// <summary>
208
7d07503621fe RunnableComponent.Dispose(bool,Exception) changed to standart Dispose(bool)
cin
parents: 205
diff changeset
19 /// Stops this instance, after the instance is stopped it can move to Failed, Ready or Disposed state, in case with the last it can't be reused.
203
4d9830a9bbb8 Added 'Fail' method to RunnableComponent which allows component to move from
cin
parents: 152
diff changeset
20 /// </summary>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
21 IPromise Stop();
240aa6994018 component model refactoring
cin
parents:
diff changeset
22
240aa6994018 component model refactoring
cin
parents:
diff changeset
23 ExecutionState State { get; }
240aa6994018 component model refactoring
cin
parents:
diff changeset
24
205
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 203
diff changeset
25 event EventHandler<StateChangeEventArgs> StateChanged;
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 203
diff changeset
26
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
27 Exception LastError { get; }
240aa6994018 component model refactoring
cin
parents:
diff changeset
28 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
29 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
30