/// <summary>
 /// Initializes a new instance of the <see cref="RunnableDecisionNode"/> class.
 /// </summary>
 /// <param name="id">The id of this decision node.</param>
 /// <param name="label">The label - useful for debugging.</param>
 /// <param name="decisionModule">The decision module that is going to be invoked to select nodes to be executed after decision</param>
 /// <param name="library">The reference to the components library.</param>
 public RunnableDecisionNode(String id, String label, TraceLab.Core.Decisions.IDecisionModule decisionModule, ComponentsLibrary library, bool waitForAllPredecessors)
     : base(id, label, new RunnableNodeCollection(), new RunnableNodeCollection(), library, waitForAllPredecessors)
 {
     if (decisionModule == null)
         throw new ArgumentNullException("decisionModule");
     m_candidateNodes = new RunnableNodeCollection();
     m_decisionModule = decisionModule;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="RunnableNode"/> class.
 /// </summary>
 /// <param name="id">The id.</param>
 /// <param name="label">The label.</param>
 /// <param name="nextNodes">The next nodes.</param>
 /// <param name="previousNodes">The previous nodes.</param>
 /// <param name="library">The library.</param>
 /// <param name="waitForAllPredecessor">if set to <c>true</c> the node will wait for all predecessor nodes to be completed.</param>
 protected RunnableNode(String id, String label, RunnableNodeCollection nextNodes, RunnableNodeCollection previousNodes, TraceLab.Core.Components.ComponentsLibrary library, bool waitForAllPredecessors)
 {
     Id = id;
     Label = label;
     NextNodes = nextNodes;
     PreviousNodes = previousNodes;
     Library = library;
     WaitsForAllPredecessors = waitForAllPredecessors;
 }
        /// <summary>
        /// Initializes a new s_instance of the <see cref="RunnableExperiment"/> class.
        /// </summary>
        /// <param name="nodesFactory">The nodes factory that is going to be used to create nodes when nodes are added to template graph.</param>
        /// <param name="library">The library.</param>
        /// <param name="componentsAppDomain">The components app domain is the app domain which components assemblies are going to be loaded into.</param>
        /// <param name="terminateExperimentExecutionResetEvent">The event that allows signalling termination of the experiment</param>
        public RunnableExperiment(IRunnableNodeFactory nodesFactory, TraceLab.Core.Components.ComponentsLibrary library,
                                  AppDomain componentsAppDomain, System.Threading.ManualResetEvent terminateExperimentExecutionResetEvent)
        {
            if (componentsAppDomain == null)
                throw new ArgumentNullException("componentsAppDomain");
            if (terminateExperimentExecutionResetEvent == null)
                throw new ArgumentNullException("terminateExperimentExecutionResetEvent");

            m_componentsAppDomain = componentsAppDomain;
            m_terminateExperimentExecutionResetEvent = terminateExperimentExecutionResetEvent;
            m_nodes = new RunnableNodeCollection();
            m_nodesFactory = nodesFactory;
            Library = library;
        }