protected T CheckStepIs <T>(ActionStep t) where T : ActionStep { if (!typeof(T).IsAssignableFrom(t.GetType())) { throw new DomainException("Step submitted is of the incorrect type for the current StepNumber of the Activity"); } return(t as T); }
protected void CheckStepNumberAndChangeIfValid(ActionStep fromStep) { if (fromStep.StepNumber > StepNumber) { throw new DomainException("Invalid step being submitted"); } if (fromStep.StepNumber < StepNumber) { StepNumber = fromStep.StepNumber; } }
public abstract ActionStep ProcessSubmittedStep(ActionStep fromStep);