Class Rule
An abstract formatting rule for a particular number or sequence of numbers.
Implements
Inherited Members
Namespace: Sepia.Globalization.Numbers.Rules
Assembly: Sepia.Globalization.dll
Syntax
public abstract class Rule : IRule
Methods
| Improve this Doc View SourceFire(RbnfContext)
Performs the rule.
Declaration
public abstract void Fire(RbnfContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RbnfContext | context | The context for formatting a rule based number. |
Matches(RbnfContext)
Determines if the rule matches the context.
Declaration
public abstract bool Matches(RbnfContext context)
Parameters
| Type | Name | Description |
|---|---|---|
| RbnfContext | context | The context for formatting a rule based number. |
Returns
| Type | Description |
|---|---|
| Boolean | true if the rule matches the |
Parse(XPathNavigator)
Create a rule from the specified XPathNavigator.
Declaration
public static IRule Parse(XPathNavigator xml)
Parameters
| Type | Name | Description |
|---|---|---|
| XPathNavigator | xml | The XML representation of a rule based number format. |
Returns
| Type | Description |
|---|---|
| IRule | A new rule. |
Remarks
The xml must be on an "rbnfrule" element.