public OutputControlsViewModel() { ISortTypeFactory sortTypeFactory = new SortTypeFactory(); ISortStrategyFactory sortStrategyFactory = new SortStrategyFactory(sortTypeFactory); IStringValidator stringValidator = new StringToDecimalValidator(); this.stringToCollectionParser = new StringToDecimalCollectionParser(stringValidator); this.sortHandler = new SortHandler(this.stringToCollectionParser, sortStrategyFactory); }
public SortHandler(IStringToCollectionParser <decimal> stringParser, ISortStrategyFactory sortStrategyFactory) { this.sortStrategyFactory = sortStrategyFactory ?? throw new ArgumentNullException(nameof(sortStrategyFactory)); this.stringToDecimalCollectionParser = stringParser ?? throw new ArgumentNullException(nameof(stringParser)); }