Exemplo n.º 1
0
 /// <summary>
 /// Evaluate <see cref="PluralRulesValues"/> for the specific <see cref="CultureInfo"/>
 /// </summary>
 /// <param name="value">The string value to evaluate</param>
 /// <param name="rulesType">The localizer type</param>
 /// <param name="culture">The <see cref="CultureInfo"/> to evaluate</param>
 /// <returns>A <see cref="PluralRulesValues"/> corresponding to the specified value</returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 /// <exception cref="CultureNotFoundException"></exception>
 public PluralRulesValues Evaluate(string value, PluralRulesTypeValues rulesType, CultureInfo culture)
 => this.Evaluate(PluralRulesContext.Create(value), rulesType, culture);
Exemplo n.º 2
0
 /// <summary>
 /// Evaluate <see cref="PluralRulesValues"/> for the specific <see cref="CultureInfo"/>
 /// </summary>
 /// <param name="value">The double value to evaluate</param>
 /// <param name="rulesType">The localizer type</param>
 /// <param name="culture">The <see cref="CultureInfo"/> to evaluate</param>
 /// <returns>A <see cref="PluralRulesValues"/> corresponding to the specified value</returns>
 /// <exception cref="ArgumentNullException"></exception>
 /// <exception cref="ArgumentException"></exception>
 /// <exception cref="CultureNotFoundException"></exception>
 public PluralRulesValues Evaluate(double value, PluralRulesTypeValues rulesType, CultureInfo culture)
 => this.Evaluate(PluralRulesContext.Create(value.ToString(CultureInfo.InvariantCulture)), rulesType, culture);