コード例 #1
0
        private static IAlgorithm GetAlgorithm(ICurrencyDeflation currency)
        {
            //TODO Ten kawałek jest nie przetestowany. CurrencyCode nie mozemy być typu string.

            if (currency.CurrencyCode.Equals("NONE"))
            {
                return(_kernel.Get <CommonAlgorithm>());
            }

            return(_kernel.Get <CurrencyAlgorithm>());
        }
コード例 #2
0
        protected Algorithm(ICurrencyDictionary dictionary, ICurrencyDeflation currencyDeflation, string splitDecimal, bool withStems)
        {
            if (dictionary == null)
            {
                throw new ArgumentNullException(nameof(dictionary));
            }

            if (currencyDeflation == null)
            {
                throw new ArgumentNullException(nameof(currencyDeflation));
            }

            this.dictionary        = dictionary;
            this.currencyDeflation = currencyDeflation;
            this.splitDecimal      = splitDecimal;
            this.withStems         = withStems;
        }
コード例 #3
0
 public CurrencyAlgorithm(ICurrencyDictionary dictionary, ICurrencyDeflation currencyDeflation, string splitDecimal, bool stems) :
     base(dictionary, currencyDeflation, splitDecimal, stems)
 {
 }