Mercurial > pub > ImplabNet
diff Implab/Components/IInitializable.cs @ 152:240aa6994018 v2
component model refactoring
author | cin |
---|---|
date | Thu, 11 Feb 2016 01:56:27 +0300 |
parents | |
children | d6a8cba73acc |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Implab/Components/IInitializable.cs Thu Feb 11 01:56:27 2016 +0300 @@ -0,0 +1,21 @@ +using System; + +namespace Implab.Components { + /// <summary> + /// Initializable components are created and initialized in two steps, first we have create the component, + /// then we have to complete it's creation by calling an <see cref="Init()"/> method. All parameters needed + /// to complete the initialization must be passed before the calling <see cref="Init()"/> + /// </summary> + public interface IInitializable { + /// <summary> + /// Completes initialization. + /// </summary> + /// <remarks> + /// Normally virtual shouldn't be called from the constructor, due to the incomplete object state, but + /// they can be called from this method. This method is also usefull when we constructing a complex grpah + /// of components where cyclic references may take place. + /// </remarks> + void Init(); + } +} +