Exemplo n.º 1
0
        public NumberTransformerBuilder GetDefaultBuilder()
        {
            var languageNumbersDictionary  = new GermanNumbersDictionary();
            var largeNumberNamesDictionary = new GermanLargeNumberNamesDictionary();

            var triplerTransformer = new GermanTripletTransformerForNumbers(languageNumbersDictionary);
            var nounInflector      = new GermanNounInflector();

            return(new NumberTransformerBuilder()
                   .SetNumbersDictionary(languageNumbersDictionary)
                   .SetLargeNumberNamesDictionary(largeNumberNamesDictionary)
                   .SetTriplerTransformer(triplerTransformer)
                   .InflectNounsBy(nounInflector)
                   .NumberSeparator(""));
        }
        public CurrencyTransformerBuilder GetDefaultBuilder()
        {
            var numberDictionary   = new GermanNumbersDictionary();
            var tripletTransformer = new GermanTripletTransformerBase(numberDictionary);

            var numberTransformer = new NumberTransformerFactory()
                                    .GetDefaultBuilder(Language.German)
                                    .SetTriplerTransformer(tripletTransformer)
                                    .Build();

            var currencyDictionary = new GermanCurrencyDictionary();
            var nounInflector      = new GermanNounInflector();

            return(new CurrencyTransformerBuilder()
                   .SetNumberTransformer(numberTransformer)
                   .SetCurrencyDictionary(currencyDictionary)
                   .SetNounInflector(nounInflector));
        }