Show / Hide Table of Contents

Class CldrExtensions

Extensions to make CLDR access easier.

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

These are simple XPath lookups for multiple documents. CLDR inheritance is not performed.

The CldrContext is used to provide extra XPath varaibles and functions.

Methods

| Improve this Doc View Source

Elements(IEnumerable<XPathDocument>, String)

Find all the elements that match the XPATH expression in the sequence of documents.

Declaration
public static IEnumerable<XPathNavigator> Elements(this IEnumerable<XPathDocument> docs, string predicate)
Parameters
Type Name Description
IEnumerable<XPathDocument> docs

The documents to search.

String predicate

The XPATH expression.

Returns
Type Description
IEnumerable<XPathNavigator>

Sequence of matched elements.

| Improve this Doc View Source

FirstElement(IEnumerable<XPathDocument>, String)

Find the first element that matches the XPATH expression in the sequence of documents.

Declaration
public static XPathNavigator FirstElement(this IEnumerable<XPathDocument> docs, string predicate)
Parameters
Type Name Description
IEnumerable<XPathDocument> docs

The documents to search.

String predicate

The XPATH expression.

Returns
Type Description
XPathNavigator

The matched element.

Exceptions
Type Condition
KeyNotFoundException

No elements match the predicate.

| Improve this Doc View Source

FirstElementOrDefault(IEnumerable<XPathDocument>, String)

Find the first element that matches the XPATH expression in the sequence of documents or return null.

Declaration
public static XPathNavigator FirstElementOrDefault(this IEnumerable<XPathDocument> docs, string predicate)
Parameters
Type Name Description
IEnumerable<XPathDocument> docs

The documents to search.

String predicate

The XPATH expression.

Returns
Type Description
XPathNavigator

The matched element or null.

| Improve this Doc View Source

FirstElementOrDefault(IEnumerable<XPathDocument>, String, Func<IEnumerable<XPathDocument>, XPathNavigator>)

Find the first element that matches the XPATH expression in the sequence of documents or return a default value.

Declaration
public static XPathNavigator FirstElementOrDefault(this IEnumerable<XPathDocument> docs, string predicate, Func<IEnumerable<XPathDocument>, XPathNavigator> defaultAction)
Parameters
Type Name Description
IEnumerable<XPathDocument> docs

The documents to seatch.

String predicate

The XPATH expression.

Func<IEnumerable<XPathDocument>, XPathNavigator> defaultAction

The action to perform when no elements match the predicate.

Returns
Type Description
XPathNavigator

The matched element.

Exceptions
Type Condition
KeyNotFoundException

No elements match the predicate.

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