Exemplo n.º 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);
        }
Exemplo n.º 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));
 }