public IViewModelFactory Resolve(IStepBase stepBase)
        {
            if (_factories.ContainsKey(stepBase.GetType()))
            {
                return(_factories[stepBase.GetType()]);
            }

            throw new KeyNotFoundException($"The step type provided for the {nameof(StepViewModelFactoryResolver)} has no factories associated with it");
        }
Example #2
0
 public BaseStepViewModel CreateStepViewModel(IStepBase stepBase)
 {
     return(new SettingsViewModel(stepBase as SettingsStep, _dateTimeInputStepViewModel));
 }
Example #3
0
 public ReturnAlgorithm(IStepBase stateBase)
 {
     this.Step = stateBase;
 }
Example #4
0
        public BaseStepViewModel CreateStepViewModel(IStepBase step)
        {
            var settingsFactory = _stepViewModelFactoryResolver.Resolve(step);

            return(settingsFactory.CreateStepViewModel(step));
        }
Example #5
0
 public BaseStepViewModel CreateStepViewModel(IStepBase step)
 {
     return(new AccountViewModel(step as AccountStep));
 }