private IState CreateState(object input) { IState result; var step1 = input as IStep; if (step1 != null) { if (!_states.ContainsKey(step1)) { IStep step = step1; _states[input] = new StepState(step, _prefix + step.Name); } result = _states[input]; } else { var flow1 = input as IFlow; if (flow1 != null) { if (!_states.ContainsKey(flow1)) { IFlow flow = flow1; _states[input] = new FlowState(flow, _prefix + flow.GetName()); } result = _states[input]; } else { throw new FlowBuilderException("No state can be created for: " + input); } } _dirty = true; return(result); }
/// <summary> /// Constructor for a FlowStep that sets the flow and of the step explicitly. /// </summary> /// <param name="flow"></param> public FlowStep(IFlow flow) : base(flow.GetName()) { }
/// <summary> /// Constructor for a FlowStep that sets the flow and of the step explicitly. /// </summary> /// <param name="flow"></param> public FlowStep(IFlow flow) : base(flow.GetName()) { }