comparison Implab/Components/IInitializable.cs @ 205:8200ab154c8a v2

Added ResetState to RunnableComponent to reset in case of failure Added StateChanged event to IRunnable Renamed Promise.SUCCESS -> Promise.Success Added Promise.FromException Renamed Bundle -> PromiseAll in PromiseExtensions
author cin
date Tue, 25 Oct 2016 17:40:33 +0300
parents d6a8cba73acc
children 9f63dade3a40
comparison
equal deleted inserted replaced
203:4d9830a9bbb8 205:8200ab154c8a
1 using System; 1 using System;
2 2
3 namespace Implab.Components { 3 namespace Implab.Components {
4 /// <summary> 4 /// <summary>
5 /// Initializable components are created and initialized in two steps, first we have create the component, 5 /// Initializable components are created and initialized in two steps, first we have create the component,
6 /// then we have to complete it's creation by calling an <see cref="Init()"/> method. All parameters needed 6 /// then we have to complete it's creation by calling an <see cref="Initialize()"/> method. All parameters needed
7 /// to complete the initialization must be passed before the calling <see cref="Init()"/> 7 /// to complete the initialization must be passed before the calling <see cref="Initialize()"/>
8 /// </summary> 8 /// </summary>
9 public interface IInitializable { 9 public interface IInitializable {
10 /// <summary> 10 /// <summary>
11 /// Completes initialization. 11 /// Completes initialization.
12 /// </summary> 12 /// </summary>
13 /// <remarks> 13 /// <remarks>
14 /// Normally virtual methods shouldn't be called from the constructor, due to the incomplete object state, but 14 /// Normally virtual methods shouldn't be called from the constructor, due to the incomplete object state, but
15 /// they can be called from this method. This method is also usefull when we constructing a complex grpah 15 /// they can be called from this method. This method is aьуерщlso usefull when we constructing a complex grpah
16 /// of components where cyclic references may take place. 16 /// of components where cyclic references may take place.
17 /// </remarks> 17 /// </remarks>
18 void Init(); 18 void Initialize();
19 } 19 }
20 } 20 }
21 21