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"); }
public BaseStepViewModel CreateStepViewModel(IStepBase stepBase) { return(new SettingsViewModel(stepBase as SettingsStep, _dateTimeInputStepViewModel)); }
public ReturnAlgorithm(IStepBase stateBase) { this.Step = stateBase; }
public BaseStepViewModel CreateStepViewModel(IStepBase step) { var settingsFactory = _stepViewModelFactoryResolver.Resolve(step); return(settingsFactory.CreateStepViewModel(step)); }
public BaseStepViewModel CreateStepViewModel(IStepBase step) { return(new AccountViewModel(step as AccountStep)); }