annotate Implab/Components/IInitializable.cs @ 269:ff581cff7003 v3

Working on Unity container xml configuration
author cin
date Tue, 24 Apr 2018 01:46:02 +0300
parents f1696cdc3d7a
children
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;
262
f1696cdc3d7a Added IInitializable.Initialize() overload
cin
parents: 251
diff changeset
2 using System.Threading;
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
3
240aa6994018 component model refactoring
cin
parents:
diff changeset
4 namespace Implab.Components {
240aa6994018 component model refactoring
cin
parents:
diff changeset
5 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
6 /// 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
7 /// 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
8 /// to complete the initialization must be passed before the calling <see cref="Initialize()"/>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
9 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
10 public interface IInitializable {
240aa6994018 component model refactoring
cin
parents:
diff changeset
11 /// <summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
12 /// Completes initialization.
240aa6994018 component model refactoring
cin
parents:
diff changeset
13 /// </summary>
240aa6994018 component model refactoring
cin
parents:
diff changeset
14 /// <remarks>
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
15 /// <para>
184
d6a8cba73acc working on runnable component
cin
parents: 152
diff changeset
16 /// 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
17 /// 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
18 /// of components where cyclic references may take place.
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
19 /// </para>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
20 /// <para>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
21 /// In asyncronous patterns <see cref="Initialize()"/> can be called
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
22 /// to start initialization and the <see cref="IRunnable.Completion"/>
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
23 /// property can be used to track operation completion.
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 250
diff changeset
24 /// </para>
152
240aa6994018 component model refactoring
cin
parents:
diff changeset
25 /// </remarks>
205
8200ab154c8a Added ResetState to RunnableComponent to reset in case of failure
cin
parents: 184
diff changeset
26 void Initialize();
262
f1696cdc3d7a Added IInitializable.Initialize() overload
cin
parents: 251
diff changeset
27 void Initialize(CancellationToken ct);
152
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