Ejemplo n.º 1
0
 /// <summary>
 /// add step
 /// </summary>
 /// <param name="step"></param>
 public void AddStep(WorkingCopyStep step)
 {
     if (Steps == null)
     {
         Steps = new List <WorkingCopyStep>();
     }
     Steps.Add(step);
 }
Ejemplo n.º 2
0
        private static IEnumerable <WorkingCopyStep> FindSteps(WorkingCopy work, WorkingCopyStep startStep, string endStepCode)
        {
            List <WorkingCopyStep> steps = new List <WorkingCopyStep>();

            if (startStep.Code == endStepCode)
            {
                return(steps);
            }
            var nextSteps = work.Flows.Where(x => x.FromStep.Contains(startStep)).SelectMany(x => x.ToStep?.Steps).ToList().Distinct();

            steps.AddRange(nextSteps);
            if (nextSteps?.Any() == true)
            {
                steps.AddRange(nextSteps.SelectMany(x => FindSteps(work, x, endStepCode)));
            }
            return(steps);
        }
Ejemplo n.º 3
0
 /// <summary>
 /// constructor for one step
 /// </summary>
 /// <param name="step"></param>
 public WorkingCopyFlowSeed(WorkingCopyStep step)
 {
     Steps = new List <WorkingCopyStep> {
         step
     };
 }
Ejemplo n.º 4
0
 /// <summary>
 /// determine if this seed contains the step
 /// </summary>
 /// <param name="step"></param>
 /// <returns></returns>
 public bool Contains(WorkingCopyStep step)
 {
     return(Steps?.Contains(step) ?? false);
 }