Class NumberingSystem
Representation of numeric value.
Inherited Members
Namespace: Sepia.Globalization.Numbers
Assembly: Sepia.Globalization.dll
Syntax
public class NumberingSystem
Properties
| Improve this Doc View SourceDigits
The digits used to represent numbers, in order, starting from zero.
Declaration
public string[] Digits { get; set; }
Property Value
Type | Description |
---|---|
String[] | Only valid when Type equals "numeric". |
See Also
| Improve this Doc View SourceId
Unique identifier of the numbering system.
Declaration
public string Id { get; set; }
Property Value
Type | Description |
---|---|
String | Such as "latn", "arab", "hanidec", etc. |
IsAlgorithmic
Determines if the Type is algorithmic.
Declaration
public bool IsAlgorithmic { get; }
Property Value
Type | Description |
---|---|
Boolean | true if Type equals "algorithmic"; otherwise, false. |
Remarks
Algorithmic systems are complex in nature, since the proper formatting and presentation of a numeric quantity is based on some algorithm or set of RuleName.
IsNumeric
Determines if the Type is numeric.
Declaration
public bool IsNumeric { get; }
Property Value
Type | Description |
---|---|
Boolean | true if Type equals "numeric"; otherwise, false. |
Remarks
Numeric systems are simply a decimal based system that uses a predefined set of Digits to represent numbers.
RuleName
The RBNF ruleset name used for formatting numbers.
Declaration
public string RuleName { get; set; }
Property Value
Type | Description |
---|---|
String | Only valid when Type equals "algorithmic". |
Remarks
The rules specifier can contain simply a ruleset name, in which case the ruleset is assumed to be found in the rule set grouping "NumberingSystemRules". Alternatively, the specifier can denote a specific locale, ruleset grouping, and ruleset name, separated by slashes.
See Also
| Improve this Doc View SourceRuleset
A set of rules for the numbering system.
Declaration
public Ruleset Ruleset { get; }
Property Value
Type | Description |
---|---|
Ruleset | Only valid when Type equals "algorithmic". |
RulesetGroup
Gets the grouping of rules for the numbering systems.
Declaration
public RulesetGroup RulesetGroup { get; }
Property Value
Type | Description |
---|---|
RulesetGroup | Only valid when Type equals "algorithmic". |
Type
The type of numbering system.
Declaration
public string Type { get; set; }
Property Value
Type | Description |
---|---|
String | Either "algorithmic" or "numeric". |
See Also
Methods
| Improve this Doc View SourceCreate(Locale)
Creates or reuses a numbering system for the specified Locale.
Declaration
public static NumberingSystem Create(Locale locale)
Parameters
Type | Name | Description |
---|---|---|
Locale | locale | The locale. |
Returns
Type | Description |
---|---|
NumberingSystem | A numbering system that is the best for the |
Remarks
The locale identifier can use the "u-nu-XXX" extension to specify a numbering system. If the extension's numbering system doesn't exist or is not specified, then the default numbering system for the locale is used.
The other numbering systems ("u-nu-native", "u-nu-finance" and "u-nu-traditio") are also allowed.
Create(String)
Creates or reuses a numbering system with the specified identifier.
Declaration
public static NumberingSystem Create(string id)
Parameters
Type | Name | Description |
---|---|---|
String | id | A case insensitive string containing the Id. |
Returns
Type | Description |
---|---|
NumberingSystem | A numbering system for the specified |
Exceptions
Type | Condition |
---|---|
KeyNotFoundException | The |