Show / Hide Table of Contents

Class Rule

An abstract formatting rule for a particular number or sequence of numbers.

Inheritance
Object
Rule
Implements
IRule
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.Rules
Assembly: Sepia.Globalization.dll
Syntax
public abstract class Rule : IRule

Methods

| Improve this Doc View Source

Fire(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.

| Improve this Doc View Source

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 context; otherwise, false.

| Improve this Doc View Source

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.

Implements

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