public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender) { toWordBuilder.Append(this._name); if (numberOfUnits == 0) { } // else { toWordBuilder.Append(FormulationOfNumber(numberOfUnits, gender)); } }
public StringBuilder Formulation(uint number, IMeasure measure, StringBuilder result) { ToWordBuilder builder = new ToWordBuilder(result); if (number == 0) { builder.Append("ноль"); builder.Append(measure.GenderPlural); } else { uint div1000 = number / 1000; FormulationOfParentGrades(div1000, 0, builder); FormulationOfGrade(number - div1000 * 1000, measure, builder); } return(result); }
public void FormulationOfParentGrades(uint number, int numberOfGrade, ToWordBuilder builder) { if (number == 0) { return; } uint div1000 = number / 1000; FormulationOfParentGrades(div1000, numberOfGrade + 1, builder); uint unt999 = number - div1000 * 1000; if (unt999 == 0) { return; } FormulationOfGrade(unt999, NumberGrades[numberOfGrade], builder); }
public void FormulationOfGrade(uint subnumber, IMeasure grade, ToWordBuilder builder) { if (this.FormulationOfGradeOvr != null) { this.FormulationOfGradeOvr(subnumber, grade, builder); return; } uint nUnit = subnumber % 10; uint nTens = (subnumber / 10) % 10; uint nHunds = (subnumber / 100) % 10; builder.Append(Hundreds[nHunds]); if ((subnumber % 100) != 0) { TenNumbers[nTens].Formulation(builder, nUnit, grade.GenderNCount); } builder.Append(Reconcile(grade, subnumber)); }
public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender) { toWordBuilder.Append(FormulationOfNumber(numberOfUnits, gender)); }
public override void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender) { toWordBuilder.Append(_tens[numberOfUnits], " "); }
public abstract void Formulation(ToWordBuilder toWordBuilder, uint numberOfUnits, GenderAndCount gender);