Example #1
0
 protected RecipeStep CopyValuesToClone(RecipeStep step)
 {
     step.IsStepDone        = IsStepDone;
     step.ShouldCancel      = ShouldCancel;
     step.MessageToUser     = MessageToUser;
     step.NextGrammarNeeded = NextGrammarNeeded;
     return(step);
 }
Example #2
0
        public override bool Equals(object obj)
        {
            RecipeStep step = obj as RecipeStep;

            if (step == null)
            {
                return(false);
            }
            else if (!step.IsStepDone.Equals(IsStepDone))
            {
                return(false);
            }
            else if (step.MessageToUser == null && MessageToUser != null)
            {
                return(false);
            }
            else if (MessageToUser != null && !step.MessageToUser.Equals(MessageToUser))
            {
                return(false);
            }
            else if (!step.Name.Equals(Name))
            {
                return(false);
            }
            else if (step.NextGrammarNeeded == null && NextGrammarNeeded != null)
            {
                return(false);
            }
            else if (NextGrammarNeeded != null && !step.NextGrammarNeeded.Equals(NextGrammarNeeded))
            {
                return(false);
            }
            else if (!step.ShouldCancel.Equals(ShouldCancel))
            {
                return(false);
            }
            return(true);
        }
Example #3
0
        public RecipeStepCall GetRecipeStepCall <T>(String stepType, T argument)
        {
            RecipeStep <T> step = GetStep(stepType) as RecipeStep <T>;

            return(new RecipeStepCall <T>(step, argument));
        }
Example #4
0
        public virtual object Clone()
        {
            RecipeStep step = new RecipeStep(Name);

            return(CopyValuesToClone(step));
        }
Example #5
0
        public RecipeStepCall GetRecipeStepCall(String stepType)
        {
            RecipeStep step = GetStep(stepType);

            return(new RecipeStepCall(step));
        }
Example #6
0
 public RecipeStepCall(RecipeStep step, RecipeStepCall nextStep)
 {
     _step     = step;
     _nextStep = nextStep;
 }
Example #7
0
 public RecipeStepCall(RecipeStep step)
     : this(step, null)
 {
 }
Example #8
0
        public override object Clone()
        {
            RecipeStep <T> step = new RecipeStep <T>(Name);

            return(CopyValuesToClone(step));
        }
Example #9
0
 public RecipeStepCall(RecipeStep <T> step, T argument)
     : base(step)
 {
     _argument = argument;
 }