Show / Hide Table of Contents

Class LocaleExtension

Represents a Unicode BCP 47 U Extension.

Inheritance
Object
LocaleExtension
Inherited Members
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 class LocaleExtension

Fields

| Improve this Doc View Source

Empty

An empty locale extension.

Declaration
public static LocaleExtension Empty
Field Value
Type Description
LocaleExtension

Attributes and Keywords are an empty sequence.

Properties

| Improve this Doc View Source

Attributes

The attributes.

Declaration
public IEnumerable<string> Attributes { get; }
Property Value
Type Description
IEnumerable<String>

A sequence of attributes.

Remarks

Currently, no attributes are defined by Unicode.

| Improve this Doc View Source

Keywords

The two character keyword and type.

Declaration
public IDictionary<string, string> Keywords { get; set; }
Property Value
Type Description
IDictionary<String, String>

A dictionary whose key is a keyword (such as 'nu' or 'va').

Remarks

If the type is not specified then it is "true".

Methods

| Improve this Doc View Source

Parse(String)

Parses the string representation of a Unicode locale extension.

Declaration
public static LocaleExtension Parse(string s)
Parameters
Type Name Description
String s

A case insensitive string containing a locale extension.

Returns
Type Description
LocaleExtension

A locale extension that refers to s.

Exceptions
Type Condition
FormatException

s is not in the correct format.

| Improve this Doc View Source

ToString()

Returns the canonical string representation.

Declaration
public override string ToString()
Returns
Type Description
String
Overrides
Object.ToString()
| Improve this Doc View Source

TryParse(String, out LocaleExtension)

Try to parse the string representation of a Unicode locale extension.

Declaration
public static bool TryParse(string s, out LocaleExtension result)
Parameters
Type Name Description
String s

A case insensitive string containing a locale extension.

LocaleExtension result

A locale extension that refers to s or null if the parsing failed.

Returns
Type Description
Boolean

true if s was parsed successfully; otherwise, false.

| Improve this Doc View Source

TryParse(String, out LocaleExtension, out String)

Try to parse the string representation of a Unicode locale extension.

Declaration
public static bool TryParse(string s, out LocaleExtension result, out string message)
Parameters
Type Name Description
String s

A case insensitive string containing a locale extension.

LocaleExtension result

A local extension that refers to s or null if the parsing failed.

String message

The reason why the parsing failed.

Returns
Type Description
Boolean

true if s was parsed successfully; otherwise, false.

Remarks

A locale extension that refers to s.

See Also

http://unicode.org/reports/tr35/tr35.html#u_Extension
  • Improve this Doc
  • View Source
Back to top Generated by DocFX