view Implab/Components/IInitializable.cs @ 156:97fbbf816844 v2

Promises: SignalXXX methods merged into SignalHandler method. Components: RunnableComponent In progress
author cin
date Mon, 15 Feb 2016 04:22:15 +0300
parents 240aa6994018
children d6a8cba73acc
line wrap: on
line source

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();
    }
}