Exemplo n.º 1
0
        public OperatorParser(IWordsFinderHelper wordsFinderHelper, IDigitsHelper digitsHelper, int minRange,
                              int maxRange, Dictionary <string, int> valueDictionary = null)
        {
            _wordFinderHelper = wordsFinderHelper;
            _digitsHelper     = digitsHelper;

            _minRange = minRange;
            _maxRange = maxRange;

            if (_minRange > _maxRange)
            {
                throw new ArgumentException("MaxRange should be less than MinRange", nameof(maxRange));
            }

            _valueDictionary = valueDictionary;

            _allowedValues = new Dictionary <int, bool>();
        }
Exemplo n.º 2
0
 internal Parser(IWordsFinderHelper wordsFinderHelper, IDigitsHelper digitsHelper)
 {
     _wordsFinderHelper = wordsFinderHelper;
     _digitsHelper      = digitsHelper;
 }