/// <summary> /// Must maintain the current step reference (this re-creating of the linked list happens when the user makes a selection on /// the current step). /// After recreating the list, our CurrentLinkedListStep reference would be referring to an item in the old linked list. /// </summary> /// <param name="cacheCurrentStep">The cache current step.</param> /// <exception cref="Exception">Error resetting current step after reorganizing steps.</exception> private void ResetCurrentLinkedListStepTo(CompleteStep <WizardBusinessObject> cacheCurrentStep) { CurrentLinkedListStep = _linkedSteps.First; while (CurrentLinkedListStep.Value != cacheCurrentStep) { if (CurrentLinkedListStep.Next == null) { throw new Exception("Error resetting current step after reorganizing steps."); } CurrentLinkedListStep = CurrentLinkedListStep.Next; } }
/// <summary> /// Initializes a new instance of the <see cref="WizardRequestNavigateEventArgs{T}"/> class. /// </summary> /// <param name="stepContext">The step context.</param> public WizardRequestNavigateEventArgs(CompleteStep <T> stepContext) { StepContext = stepContext; }
/// <summary> /// Navigates the specified step. /// </summary> /// <param name="step">The step.</param> public void Navigate(CompleteStep <WizardBusinessObject> step) { var moveTo = _linkedSteps.Find(step); CurrentLinkedListStep = moveTo; }