Fix a few bugs, and compensate removal of parameterless constructors for structs in C# 6.0
This commit is contained in:
@@ -41,10 +41,11 @@ namespace System.Unicode
|
||||
void IEnumerator.Reset() { this.index = -1; }
|
||||
}
|
||||
|
||||
/// <summary>Gets an empty <see cref="UnicodeCrossReferenceCollection"/> struct.</summary>
|
||||
public static readonly UnicodeCrossReferenceCollection Empty = new UnicodeCrossReferenceCollection(EmptyArray);
|
||||
|
||||
private readonly int[] items;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="UnicodeCrossReferenceCollection"/> struct.</summary>
|
||||
public UnicodeCrossReferenceCollection() { items = EmptyArray; }
|
||||
internal UnicodeCrossReferenceCollection(int[] items) { this.items = items ?? EmptyArray; }
|
||||
|
||||
/// <summary>Gets the cross-referenced code point at the specified index.</summary>
|
||||
|
||||
@@ -39,10 +39,11 @@ namespace System.Unicode
|
||||
void IEnumerator.Reset() { this.index = -1; }
|
||||
}
|
||||
|
||||
/// <summary>Gets an empty <see cref="UnicodeNameAliasCollection"/> struct.</summary>
|
||||
public static readonly UnicodeNameAliasCollection Empty = new UnicodeNameAliasCollection(UnicodeNameAlias.EmptyArray);
|
||||
|
||||
private readonly UnicodeNameAlias[] items;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="UnicodeNameAliasCollection"/> struct.</summary>
|
||||
public UnicodeNameAliasCollection() { items = UnicodeNameAlias.EmptyArray; }
|
||||
internal UnicodeNameAliasCollection(UnicodeNameAlias[] items) { this.items = items ?? UnicodeNameAlias.EmptyArray; }
|
||||
|
||||
/// <summary>Gets the <see cref="UnicodeNameAlias"/> at the specified index.</summary>
|
||||
|
||||
@@ -39,10 +39,11 @@ namespace System.Unicode
|
||||
void IEnumerator.Reset() { this.index = -1; }
|
||||
}
|
||||
|
||||
/// <summary>Gets an empty <see cref="UnicodeRadicalStrokeCountCollection"/> struct.</summary>
|
||||
public static readonly UnicodeRadicalStrokeCountCollection Empty = new UnicodeRadicalStrokeCountCollection(null);
|
||||
|
||||
private readonly UnicodeRadicalStrokeCount[] items;
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="UnicodeRadicalStrokeCountCollection"/> struct.</summary>
|
||||
public UnicodeRadicalStrokeCountCollection() { items = UnicodeRadicalStrokeCount.EmptyArray; }
|
||||
internal UnicodeRadicalStrokeCountCollection(UnicodeRadicalStrokeCount[] items) { this.items = items ?? UnicodeRadicalStrokeCount.EmptyArray; }
|
||||
|
||||
/// <summary>Gets the <see cref="UnicodeRadicalStrokeCount"/> at the specified index.</summary>
|
||||
|
||||
Reference in New Issue
Block a user