예제 #1
0
        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);
        }
예제 #2
0
 public SortHandler(IStringToCollectionParser <decimal> stringParser, ISortStrategyFactory sortStrategyFactory)
 {
     this.sortStrategyFactory             = sortStrategyFactory ?? throw new ArgumentNullException(nameof(sortStrategyFactory));
     this.stringToDecimalCollectionParser = stringParser ?? throw new ArgumentNullException(nameof(stringParser));
 }