annotate Implab/Components/IInitializable.cs @ 257:440801d88019 v3

working on runnable components
author cin
date Fri, 13 Apr 2018 00:43:10 +0300
parents 7c7e9ad6fe4a
children f1696cdc3d7a
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 {
240aa6994018 component model refactoring
cin
parents:
diff changeset
4 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
5 /// Initializable components are created and initialized in two steps, first we have create the component,
205
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 184
diff changeset
6 /// then we have to complete it's creation by calling an <see cref="Initialize()"/> method. All parameters needed
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 184
diff changeset
7 /// to complete the initialization must be passed before the calling <see cref="Initialize()"/>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
8 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
9 public interface IInitializable {
240aa6994018 component model refactoring
cin
parents:
diff changeset
10 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
11 /// Completes initialization.
240aa6994018 component model refactoring
cin
parents:
diff changeset
12 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
13 /// <remarks>
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
14 /// <para>
184
d6a8cba73acc working on runnable component
cin
parents: 152
diff changeset
15 /// Normally virtual methods shouldn't be called from the constructor, due to the incomplete object state, but
250
9f63dade3a40 Working on runnable component
cin
parents: 205
diff changeset
16 /// they can be called from this method. This method is also usefull when we constructing a complex grpah
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
17 /// of components where cyclic references may take place.
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
18 /// </para>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
19 /// <para>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
20 /// In asyncronous patterns <see cref="Initialize()"/> can be called
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
21 /// to start initialization and the <see cref="IRunnable.Completion"/>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
22 /// property can be used to track operation completion.
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
23 /// </para>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
24 /// </remarks>
205
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 184
diff changeset
25 void Initialize();
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
26 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
27 }
240aa6994018 component model refactoring
cin
parents:
diff changeset
28