Show / Hide Table of Contents

Class NumberingSystem

Representation of numeric value.

Inheritance
Object
NumberingSystem
Inherited Members
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Namespace: Sepia.Globalization.Numbers
Assembly: Sepia.Globalization.dll
Syntax
public class NumberingSystem

Properties

| Improve this Doc View Source

Digits

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
IsNumeric
| Improve this Doc View Source

Id

Unique identifier of the numbering system.

Declaration
public string Id { get; set; }
Property Value
Type Description
String

Such as "latn", "arab", "hanidec", etc.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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.

| Improve this Doc View Source

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
IsAlgorithmic
| Improve this Doc View Source

Ruleset

A set of rules for the numbering system.

Declaration
public Ruleset Ruleset { get; }
Property Value
Type Description
Ruleset

Only valid when Type equals "algorithmic".

| Improve this Doc View Source

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".

| Improve this Doc View Source

Type

The type of numbering system.

Declaration
public string Type { get; set; }
Property Value
Type Description
String

Either "algorithmic" or "numeric".

See Also
IsNumeric
IsAlgorithmic

Methods

| Improve this Doc View Source

Create(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 locale.

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.

| Improve this Doc View Source

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 id.

Exceptions
Type Condition
KeyNotFoundException

The id numbering system is not defined.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX