Class RulesetGroup
Grouping of rules into a functional set.
Inherited Members
Namespace: Sepia.Globalization.Numbers.Rules
Assembly: Sepia.Globalization.dll
Syntax
public class RulesetGroup
Fields
| Improve this Doc View SourceRulesets
The rule set(s) for this group.
Declaration
public IDictionary<string, Ruleset> Rulesets
Field Value
Type | Description |
---|---|
IDictionary<String, Ruleset> | A dictionary whose key is the rule set type name. |
Properties
| Improve this Doc View SourceType
The type name of the group.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
String | The valid types of rule set groupings are "SpelloutRules", "OrdinalRules", and "NumberingSystemRules". |
Methods
| Improve this Doc View SourceFormat(Decimal, String, Locale)
Formats a Decimal using the specified rule set name.
Declaration
public string Format(decimal value, string type, Locale locale = null)
Parameters
Type | Name | Description |
---|---|---|
Decimal | value | The number to format. |
String | type | The rule set name, such as "spellout-numbering" or "spellout-cardinal". |
Locale | locale | The fall-back Locale. |
Returns
Type | Description |
---|---|
String | The string representation of the |
Format(Double, String, Locale)
Formats a Double using the specified rule set name.
Declaration
public string Format(double value, string type, Locale locale = null)
Parameters
Type | Name | Description |
---|---|---|
Double | value | The number to format. |
String | type | The rule set name, such as "spellout-numbering" or "spellout-cardinal". |
Locale | locale | The fall-back Locale. |
Returns
Type | Description |
---|---|
String | The string representation of the |
Parse(XPathNavigator)
Create a rule set group from the specified XPathNavigator.
Declaration
public static RulesetGroup Parse(XPathNavigator xml)
Parameters
Type | Name | Description |
---|---|---|
XPathNavigator | xml | The XML representation of a rule set group. |
Returns
Type | Description |
---|---|
RulesetGroup | A new rule set group. |
Remarks
The xml
must be on an "rulesetGrouping" element.