private void AddOption(OptionViewModel option) { if (!option.Control.IsVisible) { return; } _options.Add(ElementFactory.CreateSummaryOption(option)); var check = option.Control as CheckViewModel; if (check == null) { return; } if (check.Value.GetValueOrDefault()) { foreach (var checkedOption in check.CheckedOptions) { AddOption(checkedOption); } } else { foreach (var uncheckedOption in check.UncheckedOptions) { AddOption(uncheckedOption); } } }
public SummaryOptionViewModel CreateSummaryOption(OptionViewModel option) { return(_container.Resolve <SummaryOptionViewModel>( new ParameterOverride(nameof(option), option))); }
public SummaryOptionViewModel(OptionViewModel option) { _option = option; }