示例#1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="flow"></param>
 /// <param name="map"></param>
 private void FindSteps(IFlow flow, IDictionary <string, IStep> map)
 {
     foreach (IState state in flow.GetStates())
     {
         var stepLocator = state as IStepLocator;
         if (stepLocator != null)
         {
             IStepLocator locator = stepLocator;
             foreach (string name in locator.GetStepNames())
             {
                 map.Add(name, locator.GetStep(name));
             }
         }
         else
         {
             var holder = state as IStepHolder;
             if (holder != null)
             {
                 IStep  step = holder.Step;
                 string name = step.Name;
                 _stepMap.Add(name, step);
             }
             else
             {
                 var flowHolder = state as IFlowHolder;
                 if (flowHolder != null)
                 {
                     foreach (IFlow subflow in flowHolder.GetFlows())
                     {
                         FindSteps(subflow, map);
                     }
                 }
             }
         }
     }
 }
示例#2
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="flow"></param>
 /// <param name="map"></param>
 private void FindSteps(IFlow flow, IDictionary<string, IStep> map)
 {
     foreach (IState state in flow.GetStates())
     {
         var stepLocator = state as IStepLocator;
         if (stepLocator != null)
         {
             IStepLocator locator = stepLocator;
             foreach (string name in locator.GetStepNames())
             {
                 map.Add(name, locator.GetStep(name));
             }
         }
         else
         {
             var holder = state as IStepHolder;
             if (holder != null)
             {
                 IStep step = holder.Step;
                 string name = step.Name;
                 _stepMap.Add(name, step);
             }
             else
             {
                 var flowHolder = state as IFlowHolder;
                 if (flowHolder != null)
                 {
                     foreach (IFlow subflow in flowHolder.GetFlows())
                     {
                         FindSteps(subflow, map);
                     }
                 }
             }
         }
     }
 }