Ejemplo n.º 1
0
        /// <summary>
        /// Appends the workflow specified to this workflow as an operation
        /// </summary>
        /// <param name="Workflow">The workflow to append</param>
        /// <param name="Constraints">
        /// Determines if the operation should be run or if it should be skipped
        /// </param>
        /// <returns>The resulting workflow object</returns>
        public IWorkflow <T> Do(IWorkflow <T> Workflow, params IConstraint <T>[] Constraints)
        {
            IWorkflowNode <T> Node = Nodes.AddAndReturn(new WorkflowNode <T>());

            Node.AddOperation(Workflow, Constraints);
            return(this);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Causes multiple commands to be executed concurrently
        /// </summary>
        /// <param name="Workflow">The workflow to append</param>
        /// <param name="Constraints">
        /// Determines if the operation should be run or if it should be skipped
        /// </param>
        /// <returns>The resulting workflow object</returns>
        public IWorkflow <T> And(IWorkflow <T> Workflow, params IConstraint <T>[] Constraints)
        {
            IWorkflowNode <T> Node = Nodes.LastOrDefault();

            if (Node == null)
            {
                Node = Nodes.AddAndReturn(new WorkflowNode <T>());
            }
            Node.AddOperation(Workflow, Constraints);
            return(this);
        }