/// <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);
/// <summary> /// Indicates whether the specified <see cref="CultureInfo"/> is supported /// </summary> /// <param name="rulesType">The localizer type</param> /// <param name="culture">The <see cref="CultureInfo"/> to test</param> /// <returns>true if the <see cref="CultureInfo"/> is supported, otherwise false</returns> /// <remarks> /// If the specified <see cref="CultureInfo"/> does not exists, it will try to use the parent <see cref="CultureInfo"/> of the specified one. /// </remarks> /// <exception cref="ArgumentNullException"></exception> /// <exception cref="ArgumentException"></exception> public bool IsSupported(PluralRulesTypeValues rulesType, CultureInfo culture) => rulesType switch {
/// <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);