Ejemplo n.º 1
0
 public static IDynamicSpeller AsDynamic <TParadigm> (this INumberSpelling <TParadigm> numberSpelling, TParadigm caseNames)
 {
     return(new DynamicSpeller <TParadigm> (numberSpelling, caseNames));
 }
Ejemplo n.º 2
0
 public NumberSpelling(INumberSpelling inner)
 {
     this.inner = inner;
 }
Ejemplo n.º 3
0
 public Speller(INumberSpelling <TParadigm> speller, ICase <TParadigm> @case)
 {
     this.speller = speller;
     this.@case   = @case;
 }
Ejemplo n.º 4
0
 public DynamicSpeller(INumberSpelling <TParadigm> genericSpeller, TParadigm caseNames)
 {
     this.genericSpeller = genericSpeller;
     this.caseParser     = new CaseParser <TParadigm> (genericSpeller.Cases, caseNames);
 }
 public static void СуммаПрописьюНаРазныхЯзыках <TParadigm> (INumberSpelling <TParadigm> language, ДенежнаяЕдиница денежнаяЕдиница, ICase <TParadigm> @case)
 {
     Console.WriteLine(денежнаяЕдиница.СуммаПрописью(100m, language.AddCase(@case)));
 }
Ejemplo n.º 6
0
 static string Spell <TParadigm> (INumberSpelling <TParadigm> lang, decimal n, string unit, ICase <TParadigm> @case)
 {
     return(lang.Spell(n, ref unit, @case) + " " + unit);
 }
Ejemplo n.º 7
0
 static void GetAllCases <TParadigm> (INumberSpelling <TParadigm> lang, decimal n, string unit)
 {
     PrintAll(lang.Cases.Select(c => Spell(lang, n, unit, c)));
 }
Ejemplo n.º 8
0
 public static ISpeller DefaultCase <TParadigm> (this INumberSpelling <TParadigm> speller)
 {
     return(new Speller <TParadigm> (speller, speller.Nominative));
 }
Ejemplo n.º 9
0
 public static ISpeller AddCase <TParadigm> (this INumberSpelling <TParadigm> speller, ICase <TParadigm> @case)
 {
     return(new Speller <TParadigm> (speller, @case));
 }