Habanero.Faces.Base.WizardController.GetPreviousStep C# (CSharp) Method

GetPreviousStep() public method

Returns the Previous Step and sets the step pointer to that step.
Thrown if the current step is the first step.
public GetPreviousStep ( ) : IWizardStep
return IWizardStep
        public virtual IWizardStep GetPreviousStep()
        {

            if (CurrentStep > 0)
            {
                _visitedSteps.Pop();
                IWizardStep previousStep = _visitedSteps.Peek();
                CurrentStep = WizardSteps.IndexOf(previousStep);
                return previousStep;
            }
            throw new WizardStepException("Invalid Wizard Step: " + (CurrentStep - 1));
        }