using System.Diagnostics; using System.Linq; namespace System.Unicode { /// Represents a name alias for an Unicode code point. [DebuggerDisplay("{DisplayText,nq}")] public struct UnicodeNameAlias { internal static readonly UnicodeNameAlias[] EmptyArray = new UnicodeNameAlias[0]; /// Gets the alias name. /// The name. public string Name { get; } /// Gets the kind of alias. /// The kind of alias. public UnicodeNameAliasKind Kind { get; } private string DisplayText => (Kind != 0 ? "<" + EnumHelper.GetValueNames(Kind).FirstOrDefault() + "> " : string.Empty) + Name; internal UnicodeNameAlias(string name, UnicodeNameAliasKind kind) { Name = name; Kind = kind; } } }