2017-06-25 02:36:38 +02:00
|
|
|
|
using System.Globalization;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
|
2014-11-03 00:05:54 +01:00
|
|
|
|
namespace System.Unicode
|
2014-10-27 21:12:57 +01:00
|
|
|
|
{
|
2017-06-25 02:36:38 +02:00
|
|
|
|
internal struct UnicodeCharacterData
|
2014-10-27 21:12:57 +01:00
|
|
|
|
{
|
2014-11-24 21:47:06 +01:00
|
|
|
|
public readonly UnicodeCodePointRange CodePointRange;
|
2014-11-03 03:44:41 +01:00
|
|
|
|
public readonly string Name;
|
2014-11-21 15:41:27 +01:00
|
|
|
|
public readonly UnicodeNameAlias[] NameAliases;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
public readonly UnicodeCategory Category;
|
|
|
|
|
|
public readonly CanonicalCombiningClass CanonicalCombiningClass;
|
2014-11-02 21:56:24 +01:00
|
|
|
|
public readonly BidirectionalClass BidirectionalClass;
|
2014-11-07 01:05:40 +01:00
|
|
|
|
public readonly CompatibilityFormattingTag DecompositionType;
|
|
|
|
|
|
public readonly string DecompositionMapping;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
public readonly UnicodeNumericType NumericType;
|
2014-11-03 03:44:41 +01:00
|
|
|
|
private readonly UnicodeRationalNumber numericValue;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
public readonly bool BidirectionalMirrored;
|
|
|
|
|
|
public readonly string OldName;
|
|
|
|
|
|
public readonly string SimpleUpperCaseMapping;
|
|
|
|
|
|
public readonly string SimpleLowerCaseMapping;
|
|
|
|
|
|
public readonly string SimpleTitleCaseMapping;
|
2014-11-01 14:09:56 +01:00
|
|
|
|
public readonly ContributoryProperties ContributoryProperties;
|
2017-06-25 02:36:38 +02:00
|
|
|
|
private readonly int corePropertiesAndEmojiProperties;
|
|
|
|
|
|
public CoreProperties CoreProperties => (CoreProperties)(corePropertiesAndEmojiProperties & 0x000FFFFF);
|
|
|
|
|
|
public EmojiProperties EmojiProperties => (EmojiProperties)(corePropertiesAndEmojiProperties >> 20);
|
2014-10-27 21:12:57 +01:00
|
|
|
|
|
2014-11-24 00:24:55 +01:00
|
|
|
|
public readonly int[] CrossRerefences; // NB: It seems that parsing NamesList is required in order to provide data for this field ?
|
2014-10-27 21:12:57 +01:00
|
|
|
|
|
2014-11-01 14:09:56 +01:00
|
|
|
|
internal UnicodeCharacterData
|
2014-10-27 21:12:57 +01:00
|
|
|
|
(
|
2014-11-24 21:47:06 +01:00
|
|
|
|
UnicodeCodePointRange codePointRange,
|
2014-10-27 21:12:57 +01:00
|
|
|
|
string name,
|
2014-11-21 15:41:27 +01:00
|
|
|
|
UnicodeNameAlias[] nameAliases,
|
2014-10-27 21:12:57 +01:00
|
|
|
|
UnicodeCategory category,
|
|
|
|
|
|
CanonicalCombiningClass canonicalCombiningClass,
|
2014-11-02 21:56:24 +01:00
|
|
|
|
BidirectionalClass bidirectionalClass,
|
2014-11-07 01:05:40 +01:00
|
|
|
|
CompatibilityFormattingTag decompositionType,
|
2014-11-16 21:27:57 +01:00
|
|
|
|
string decompositionMapping,
|
2014-10-27 21:12:57 +01:00
|
|
|
|
UnicodeNumericType numericType,
|
|
|
|
|
|
UnicodeRationalNumber numericValue,
|
|
|
|
|
|
bool bidirectionalMirrored,
|
|
|
|
|
|
string oldName,
|
2014-11-16 21:27:57 +01:00
|
|
|
|
string simpleUpperCaseMapping,
|
2014-10-27 21:12:57 +01:00
|
|
|
|
string simpleLowerCaseMapping,
|
|
|
|
|
|
string simpleTitleCaseMapping,
|
2014-11-01 14:09:56 +01:00
|
|
|
|
ContributoryProperties contributoryProperties,
|
2017-06-25 02:36:38 +02:00
|
|
|
|
int corePropertiesAndEmojiProperties,
|
2014-11-24 00:24:55 +01:00
|
|
|
|
int[] crossRerefences
|
2014-10-27 21:12:57 +01:00
|
|
|
|
)
|
|
|
|
|
|
{
|
2014-11-02 21:56:24 +01:00
|
|
|
|
this.CodePointRange = codePointRange;
|
2014-11-03 03:44:41 +01:00
|
|
|
|
this.Name = name;
|
2014-11-21 15:41:27 +01:00
|
|
|
|
this.NameAliases = nameAliases;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
this.Category = category;
|
|
|
|
|
|
this.CanonicalCombiningClass = canonicalCombiningClass;
|
|
|
|
|
|
this.BidirectionalClass = bidirectionalClass;
|
|
|
|
|
|
this.DecompositionType = decompositionType;
|
2014-11-07 01:05:40 +01:00
|
|
|
|
this.DecompositionMapping = decompositionMapping;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
this.NumericType = numericType;
|
2014-11-03 03:44:41 +01:00
|
|
|
|
this.numericValue = numericValue;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
this.BidirectionalMirrored = bidirectionalMirrored;
|
|
|
|
|
|
this.OldName = oldName;
|
|
|
|
|
|
this.SimpleUpperCaseMapping = simpleUpperCaseMapping;
|
|
|
|
|
|
this.SimpleLowerCaseMapping = simpleLowerCaseMapping;
|
|
|
|
|
|
this.SimpleTitleCaseMapping = simpleTitleCaseMapping;
|
2014-11-01 14:09:56 +01:00
|
|
|
|
this.ContributoryProperties = contributoryProperties;
|
2017-06-25 02:36:38 +02:00
|
|
|
|
this.corePropertiesAndEmojiProperties = corePropertiesAndEmojiProperties;
|
2014-11-24 00:24:55 +01:00
|
|
|
|
this.CrossRerefences = crossRerefences;
|
2014-11-16 21:27:57 +01:00
|
|
|
|
}
|
2014-11-02 21:56:24 +01:00
|
|
|
|
|
2017-06-25 02:36:38 +02:00
|
|
|
|
public UnicodeRationalNumber? NumericValue => NumericType != UnicodeNumericType.None ? numericValue : null as UnicodeRationalNumber?;
|
2014-10-27 21:12:57 +01:00
|
|
|
|
}
|
|
|
|
|
|
}
|