Annotate System.Text.Encodings.Web (dotnet/corefx#42362)
authorEirik Tsarpalis <eirik.tsarpalis@gmail.com>
Tue, 5 Nov 2019 14:42:36 +0000 (14:42 +0000)
committerGitHub <noreply@github.com>
Tue, 5 Nov 2019 14:42:36 +0000 (14:42 +0000)
Commit migrated from https://github.com/dotnet/corefx/commit/0cd8e74d310fb62a861ba1bda19e5d8ba3b42e0d

src/libraries/System.Text.Encodings.Web/ref/System.Text.Encodings.Web.csproj
src/libraries/System.Text.Encodings.Web/src/System.Text.Encodings.Web.csproj
src/libraries/System.Text.Encodings.Web/src/System/Text/Encodings/Web/TextEncoder.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeHelpers.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.cs
src/libraries/System.Text.Encodings.Web/src/System/Text/Unicode/UnicodeRanges.generated.cs
src/libraries/System.Text.Encodings.Web/tools/GenUnicodeRanges/Program.cs

index fd1ad36e458fee4089d95a87945c923f2aa1655d..f43d45561ba8100404a4b08de0c8282e1dc57e4f 100644 (file)
@@ -1,7 +1,8 @@
-<Project Sdk="Microsoft.NET.Sdk" ToolsVersion="Current">
+<Project Sdk="Microsoft.NET.Sdk">
   <PropertyGroup>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netstandard2.0-Debug;netstandard2.0-Release</Configurations>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System.Text.Encodings.Web.cs" />
index 636feac1183a4368e5690da79125efbfe08d55e4..db96caaa273dfaf88995a886a908072b3d1556e4 100644 (file)
@@ -2,6 +2,8 @@
   <PropertyGroup>
     <AllowUnsafeBlocks>true</AllowUnsafeBlocks>
     <Configurations>netcoreapp-Debug;netcoreapp-Release;netcoreapp3.0-Debug;netcoreapp3.0-Release;netstandard2.0-Debug;netstandard2.0-Release;netstandard2.1-Debug;netstandard2.1-Release</Configurations>
+    <DefineConstants Condition="'$(TargetsNetCoreApp)' != 'true'">$(DefineConstants);INTERNAL_NULLABLE_ATTRIBUTES</DefineConstants>
+    <Nullable>enable</Nullable>
   </PropertyGroup>
   <ItemGroup>
     <Compile Include="System\Text\Encodings\Web\DefaultJavaScriptEncoder.cs" />
@@ -32,6 +34,9 @@
     <Compile Include="$(CommonPath)\CoreLib\System\Text\UnicodeUtility.cs">
       <Link>System\Text\UnicodeUtility.cs</Link>
     </Compile>
+    </ItemGroup>
+  <ItemGroup Condition="'$(TargetsNetCoreApp)' != 'true' And '$(TargetFramework)' != 'netstandard2.1' ">
+    <Compile Include="$(CommonPath)\CoreLib\System\Diagnostics\CodeAnalysis\NullableAttributes.cs" Link="System\Diagnostics\CodeAnalysis\NullableAttributes.cs" />
   </ItemGroup>
   <ItemGroup>
     <Reference Include="System.Memory" />
@@ -44,4 +49,4 @@
     <Reference Include="System.Runtime.Intrinsics" />
     <Reference Include="System.Threading" />
   </ItemGroup>
-</Project>
\ No newline at end of file
+</Project>
index f2de4c5515dd40069b6ec0d13bd9210c8f8f72d8..ec15bfbf740204fed5cc6aaea29850307b9fb3eb 100644 (file)
@@ -410,7 +410,7 @@ namespace System.Text.Encodings.Web
                     if (UnicodeUtility.IsAsciiCodePoint(nextScalarValue))
                     {
                         // Check Ascii cache.
-                        byte[] encodedBytes = GetAsciiEncoding((byte)nextScalarValue);
+                        byte[]? encodedBytes = GetAsciiEncoding((byte)nextScalarValue);
 
                         if (ReferenceEquals(encodedBytes, s_noEscape))
                         {
@@ -615,7 +615,7 @@ namespace System.Text.Encodings.Web
 
         private unsafe void EncodeCore(TextWriter output, char* value, int valueLength)
         {
-            Debug.Assert(value != null & output != null);
+            Debug.Assert(value != null && output != null);
             Debug.Assert(valueLength >= 0);
 
             int bufferLength = MaxOutputCharactersPerInputCharacter;
@@ -881,7 +881,7 @@ namespace System.Text.Encodings.Web
         }
 
         [MethodImpl(MethodImplOptions.AggressiveInlining)]
-        private byte[] GetAsciiEncoding(byte value)
+        private byte[]? GetAsciiEncoding(byte value)
         {
             byte[] encoding = _asciiEscape[value];
             if (encoding == null)
index 0a0f0074bbb541dcc65c938856269d7d4980a94f..2a9525d81214535f60ed6c831960caffbab36fdb 100644 (file)
@@ -2,6 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+#nullable enable
 using System.Buffers;
 using System.Buffers.Binary;
 using System.Diagnostics;
@@ -27,7 +28,7 @@ namespace System.Text.Unicode
 
         // This field is only used on big-endian architectures. We don't
         // bother computing it on little-endian architectures.
-        private static readonly uint[] _definedCharacterBitmapBigEndian = (BitConverter.IsLittleEndian) ? null : CreateDefinedCharacterBitmapMachineEndian();
+        private static readonly uint[]? _definedCharacterBitmapBigEndian = (BitConverter.IsLittleEndian) ? null : CreateDefinedCharacterBitmapMachineEndian();
 
         private static uint[] CreateDefinedCharacterBitmapMachineEndian()
         {
index e940bef8a9a9b88f19766a2faac02ea1442379b8..0eead10f2d2b40a011ea2cff0b40c376b5c620c9 100644 (file)
@@ -2,6 +2,7 @@
 // The .NET Foundation licenses this file to you under the MIT license.
 // See the LICENSE file in the project root for more information.
 
+using System.Diagnostics.CodeAnalysis;
 using System.Runtime.CompilerServices;
 using System.Threading;
 
@@ -17,28 +18,26 @@ namespace System.Text.Unicode
         /// An empty <see cref="UnicodeRange"/>. This range contains no code points.
         /// </summary>
         public static UnicodeRange None => _none ?? CreateEmptyRange(ref _none);
-        private static UnicodeRange _none;
+        private static UnicodeRange? _none;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> which contains all characters in the Unicode Basic
         /// Multilingual Plane (U+0000..U+FFFF).
         /// </summary>
         public static UnicodeRange All => _all ?? CreateRange(ref _all, '\u0000', '\uFFFF');
-        private static UnicodeRange _all;
+        private static UnicodeRange? _all;
 
         [MethodImpl(MethodImplOptions.NoInlining)] // the caller should be inlined, not this method
-        private static UnicodeRange CreateEmptyRange(ref UnicodeRange range)
+        private static UnicodeRange CreateEmptyRange([NotNull] ref UnicodeRange? range)
         {
-            // If the range hasn't been created, create it now.
             // It's ok if two threads race and one overwrites the other's 'range' value.
             Volatile.Write(ref range, new UnicodeRange(0, 0));
             return range;
         }
 
         [MethodImpl(MethodImplOptions.NoInlining)] // the caller should be inlined, not this method
-        private static UnicodeRange CreateRange(ref UnicodeRange range, char first, char last)
+        private static UnicodeRange CreateRange([NotNull] ref UnicodeRange? range, char first, char last)
         {
-            // If the range hasn't been created, create it now.
             // It's ok if two threads race and one overwrites the other's 'range' value.
             Volatile.Write(ref range, UnicodeRange.Create(first, last));
             return range;
index 5568bfb411c86307646890b5c6d45878ff02bcf6..400c98e37773c113bf569896bd39ecabfc108b32 100644 (file)
@@ -5,6 +5,8 @@
 // This file was generated by a tool.
 // See src/System.Text.Encodings.Web/tools/GenUnicodeRanges
 
+#nullable enable
+
 namespace System.Text.Unicode
 {
     public static partial class UnicodeRanges
@@ -16,7 +18,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0000.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange BasicLatin => _u0000 ?? CreateRange(ref _u0000, first: '\u0000', last: '\u007F');
-        private static UnicodeRange _u0000;
+        private static UnicodeRange? _u0000;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin-1 Supplement' Unicode block (U+0080..U+00FF).
@@ -25,7 +27,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0080.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Latin1Supplement => _u0080 ?? CreateRange(ref _u0080, first: '\u0080', last: '\u00FF');
-        private static UnicodeRange _u0080;
+        private static UnicodeRange? _u0080;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended-A' Unicode block (U+0100..U+017F).
@@ -34,7 +36,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0100.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedA => _u0100 ?? CreateRange(ref _u0100, first: '\u0100', last: '\u017F');
-        private static UnicodeRange _u0100;
+        private static UnicodeRange? _u0100;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended-B' Unicode block (U+0180..U+024F).
@@ -43,7 +45,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0180.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedB => _u0180 ?? CreateRange(ref _u0180, first: '\u0180', last: '\u024F');
-        private static UnicodeRange _u0180;
+        private static UnicodeRange? _u0180;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'IPA Extensions' Unicode block (U+0250..U+02AF).
@@ -52,7 +54,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0250.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange IpaExtensions => _u0250 ?? CreateRange(ref _u0250, first: '\u0250', last: '\u02AF');
-        private static UnicodeRange _u0250;
+        private static UnicodeRange? _u0250;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Spacing Modifier Letters' Unicode block (U+02B0..U+02FF).
@@ -61,7 +63,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U02B0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SpacingModifierLetters => _u02B0 ?? CreateRange(ref _u02B0, first: '\u02B0', last: '\u02FF');
-        private static UnicodeRange _u02B0;
+        private static UnicodeRange? _u02B0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Combining Diacritical Marks' Unicode block (U+0300..U+036F).
@@ -70,7 +72,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0300.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CombiningDiacriticalMarks => _u0300 ?? CreateRange(ref _u0300, first: '\u0300', last: '\u036F');
-        private static UnicodeRange _u0300;
+        private static UnicodeRange? _u0300;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Greek and Coptic' Unicode block (U+0370..U+03FF).
@@ -79,7 +81,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0370.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GreekandCoptic => _u0370 ?? CreateRange(ref _u0370, first: '\u0370', last: '\u03FF');
-        private static UnicodeRange _u0370;
+        private static UnicodeRange? _u0370;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cyrillic' Unicode block (U+0400..U+04FF).
@@ -88,7 +90,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0400.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Cyrillic => _u0400 ?? CreateRange(ref _u0400, first: '\u0400', last: '\u04FF');
-        private static UnicodeRange _u0400;
+        private static UnicodeRange? _u0400;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cyrillic Supplement' Unicode block (U+0500..U+052F).
@@ -97,7 +99,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0500.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CyrillicSupplement => _u0500 ?? CreateRange(ref _u0500, first: '\u0500', last: '\u052F');
-        private static UnicodeRange _u0500;
+        private static UnicodeRange? _u0500;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Armenian' Unicode block (U+0530..U+058F).
@@ -106,7 +108,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0530.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Armenian => _u0530 ?? CreateRange(ref _u0530, first: '\u0530', last: '\u058F');
-        private static UnicodeRange _u0530;
+        private static UnicodeRange? _u0530;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hebrew' Unicode block (U+0590..U+05FF).
@@ -115,7 +117,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0590.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Hebrew => _u0590 ?? CreateRange(ref _u0590, first: '\u0590', last: '\u05FF');
-        private static UnicodeRange _u0590;
+        private static UnicodeRange? _u0590;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arabic' Unicode block (U+0600..U+06FF).
@@ -124,7 +126,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0600.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Arabic => _u0600 ?? CreateRange(ref _u0600, first: '\u0600', last: '\u06FF');
-        private static UnicodeRange _u0600;
+        private static UnicodeRange? _u0600;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Syriac' Unicode block (U+0700..U+074F).
@@ -133,7 +135,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0700.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Syriac => _u0700 ?? CreateRange(ref _u0700, first: '\u0700', last: '\u074F');
-        private static UnicodeRange _u0700;
+        private static UnicodeRange? _u0700;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arabic Supplement' Unicode block (U+0750..U+077F).
@@ -142,7 +144,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0750.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ArabicSupplement => _u0750 ?? CreateRange(ref _u0750, first: '\u0750', last: '\u077F');
-        private static UnicodeRange _u0750;
+        private static UnicodeRange? _u0750;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Thaana' Unicode block (U+0780..U+07BF).
@@ -151,7 +153,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0780.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Thaana => _u0780 ?? CreateRange(ref _u0780, first: '\u0780', last: '\u07BF');
-        private static UnicodeRange _u0780;
+        private static UnicodeRange? _u0780;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'NKo' Unicode block (U+07C0..U+07FF).
@@ -160,7 +162,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U07C0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange NKo => _u07C0 ?? CreateRange(ref _u07C0, first: '\u07C0', last: '\u07FF');
-        private static UnicodeRange _u07C0;
+        private static UnicodeRange? _u07C0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Samaritan' Unicode block (U+0800..U+083F).
@@ -169,7 +171,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0800.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Samaritan => _u0800 ?? CreateRange(ref _u0800, first: '\u0800', last: '\u083F');
-        private static UnicodeRange _u0800;
+        private static UnicodeRange? _u0800;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Mandaic' Unicode block (U+0840..U+085F).
@@ -178,7 +180,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0840.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Mandaic => _u0840 ?? CreateRange(ref _u0840, first: '\u0840', last: '\u085F');
-        private static UnicodeRange _u0840;
+        private static UnicodeRange? _u0840;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Syriac Supplement' Unicode block (U+0860..U+086F).
@@ -187,7 +189,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0860.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SyriacSupplement => _u0860 ?? CreateRange(ref _u0860, first: '\u0860', last: '\u086F');
-        private static UnicodeRange _u0860;
+        private static UnicodeRange? _u0860;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arabic Extended-A' Unicode block (U+08A0..U+08FF).
@@ -196,7 +198,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U08A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ArabicExtendedA => _u08A0 ?? CreateRange(ref _u08A0, first: '\u08A0', last: '\u08FF');
-        private static UnicodeRange _u08A0;
+        private static UnicodeRange? _u08A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Devanagari' Unicode block (U+0900..U+097F).
@@ -205,7 +207,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0900.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Devanagari => _u0900 ?? CreateRange(ref _u0900, first: '\u0900', last: '\u097F');
-        private static UnicodeRange _u0900;
+        private static UnicodeRange? _u0900;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Bengali' Unicode block (U+0980..U+09FF).
@@ -214,7 +216,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0980.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Bengali => _u0980 ?? CreateRange(ref _u0980, first: '\u0980', last: '\u09FF');
-        private static UnicodeRange _u0980;
+        private static UnicodeRange? _u0980;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Gurmukhi' Unicode block (U+0A00..U+0A7F).
@@ -223,7 +225,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0A00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Gurmukhi => _u0A00 ?? CreateRange(ref _u0A00, first: '\u0A00', last: '\u0A7F');
-        private static UnicodeRange _u0A00;
+        private static UnicodeRange? _u0A00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Gujarati' Unicode block (U+0A80..U+0AFF).
@@ -232,7 +234,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0A80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Gujarati => _u0A80 ?? CreateRange(ref _u0A80, first: '\u0A80', last: '\u0AFF');
-        private static UnicodeRange _u0A80;
+        private static UnicodeRange? _u0A80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Oriya' Unicode block (U+0B00..U+0B7F).
@@ -241,7 +243,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0B00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Oriya => _u0B00 ?? CreateRange(ref _u0B00, first: '\u0B00', last: '\u0B7F');
-        private static UnicodeRange _u0B00;
+        private static UnicodeRange? _u0B00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tamil' Unicode block (U+0B80..U+0BFF).
@@ -250,7 +252,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0B80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Tamil => _u0B80 ?? CreateRange(ref _u0B80, first: '\u0B80', last: '\u0BFF');
-        private static UnicodeRange _u0B80;
+        private static UnicodeRange? _u0B80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Telugu' Unicode block (U+0C00..U+0C7F).
@@ -259,7 +261,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0C00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Telugu => _u0C00 ?? CreateRange(ref _u0C00, first: '\u0C00', last: '\u0C7F');
-        private static UnicodeRange _u0C00;
+        private static UnicodeRange? _u0C00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Kannada' Unicode block (U+0C80..U+0CFF).
@@ -268,7 +270,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0C80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Kannada => _u0C80 ?? CreateRange(ref _u0C80, first: '\u0C80', last: '\u0CFF');
-        private static UnicodeRange _u0C80;
+        private static UnicodeRange? _u0C80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Malayalam' Unicode block (U+0D00..U+0D7F).
@@ -277,7 +279,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0D00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Malayalam => _u0D00 ?? CreateRange(ref _u0D00, first: '\u0D00', last: '\u0D7F');
-        private static UnicodeRange _u0D00;
+        private static UnicodeRange? _u0D00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Sinhala' Unicode block (U+0D80..U+0DFF).
@@ -286,7 +288,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0D80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Sinhala => _u0D80 ?? CreateRange(ref _u0D80, first: '\u0D80', last: '\u0DFF');
-        private static UnicodeRange _u0D80;
+        private static UnicodeRange? _u0D80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Thai' Unicode block (U+0E00..U+0E7F).
@@ -295,7 +297,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0E00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Thai => _u0E00 ?? CreateRange(ref _u0E00, first: '\u0E00', last: '\u0E7F');
-        private static UnicodeRange _u0E00;
+        private static UnicodeRange? _u0E00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Lao' Unicode block (U+0E80..U+0EFF).
@@ -304,7 +306,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0E80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Lao => _u0E80 ?? CreateRange(ref _u0E80, first: '\u0E80', last: '\u0EFF');
-        private static UnicodeRange _u0E80;
+        private static UnicodeRange? _u0E80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tibetan' Unicode block (U+0F00..U+0FFF).
@@ -313,7 +315,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U0F00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Tibetan => _u0F00 ?? CreateRange(ref _u0F00, first: '\u0F00', last: '\u0FFF');
-        private static UnicodeRange _u0F00;
+        private static UnicodeRange? _u0F00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Myanmar' Unicode block (U+1000..U+109F).
@@ -322,7 +324,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1000.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Myanmar => _u1000 ?? CreateRange(ref _u1000, first: '\u1000', last: '\u109F');
-        private static UnicodeRange _u1000;
+        private static UnicodeRange? _u1000;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Georgian' Unicode block (U+10A0..U+10FF).
@@ -331,7 +333,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U10A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Georgian => _u10A0 ?? CreateRange(ref _u10A0, first: '\u10A0', last: '\u10FF');
-        private static UnicodeRange _u10A0;
+        private static UnicodeRange? _u10A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hangul Jamo' Unicode block (U+1100..U+11FF).
@@ -340,7 +342,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1100.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HangulJamo => _u1100 ?? CreateRange(ref _u1100, first: '\u1100', last: '\u11FF');
-        private static UnicodeRange _u1100;
+        private static UnicodeRange? _u1100;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ethiopic' Unicode block (U+1200..U+137F).
@@ -349,7 +351,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1200.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Ethiopic => _u1200 ?? CreateRange(ref _u1200, first: '\u1200', last: '\u137F');
-        private static UnicodeRange _u1200;
+        private static UnicodeRange? _u1200;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ethiopic Supplement' Unicode block (U+1380..U+139F).
@@ -358,7 +360,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1380.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange EthiopicSupplement => _u1380 ?? CreateRange(ref _u1380, first: '\u1380', last: '\u139F');
-        private static UnicodeRange _u1380;
+        private static UnicodeRange? _u1380;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cherokee' Unicode block (U+13A0..U+13FF).
@@ -367,7 +369,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U13A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Cherokee => _u13A0 ?? CreateRange(ref _u13A0, first: '\u13A0', last: '\u13FF');
-        private static UnicodeRange _u13A0;
+        private static UnicodeRange? _u13A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Unified Canadian Aboriginal Syllabics' Unicode block (U+1400..U+167F).
@@ -376,7 +378,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1400.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange UnifiedCanadianAboriginalSyllabics => _u1400 ?? CreateRange(ref _u1400, first: '\u1400', last: '\u167F');
-        private static UnicodeRange _u1400;
+        private static UnicodeRange? _u1400;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ogham' Unicode block (U+1680..U+169F).
@@ -385,7 +387,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1680.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Ogham => _u1680 ?? CreateRange(ref _u1680, first: '\u1680', last: '\u169F');
-        private static UnicodeRange _u1680;
+        private static UnicodeRange? _u1680;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Runic' Unicode block (U+16A0..U+16FF).
@@ -394,7 +396,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U16A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Runic => _u16A0 ?? CreateRange(ref _u16A0, first: '\u16A0', last: '\u16FF');
-        private static UnicodeRange _u16A0;
+        private static UnicodeRange? _u16A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tagalog' Unicode block (U+1700..U+171F).
@@ -403,7 +405,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1700.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Tagalog => _u1700 ?? CreateRange(ref _u1700, first: '\u1700', last: '\u171F');
-        private static UnicodeRange _u1700;
+        private static UnicodeRange? _u1700;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hanunoo' Unicode block (U+1720..U+173F).
@@ -412,7 +414,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1720.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Hanunoo => _u1720 ?? CreateRange(ref _u1720, first: '\u1720', last: '\u173F');
-        private static UnicodeRange _u1720;
+        private static UnicodeRange? _u1720;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Buhid' Unicode block (U+1740..U+175F).
@@ -421,7 +423,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1740.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Buhid => _u1740 ?? CreateRange(ref _u1740, first: '\u1740', last: '\u175F');
-        private static UnicodeRange _u1740;
+        private static UnicodeRange? _u1740;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tagbanwa' Unicode block (U+1760..U+177F).
@@ -430,7 +432,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1760.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Tagbanwa => _u1760 ?? CreateRange(ref _u1760, first: '\u1760', last: '\u177F');
-        private static UnicodeRange _u1760;
+        private static UnicodeRange? _u1760;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Khmer' Unicode block (U+1780..U+17FF).
@@ -439,7 +441,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1780.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Khmer => _u1780 ?? CreateRange(ref _u1780, first: '\u1780', last: '\u17FF');
-        private static UnicodeRange _u1780;
+        private static UnicodeRange? _u1780;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Mongolian' Unicode block (U+1800..U+18AF).
@@ -448,7 +450,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1800.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Mongolian => _u1800 ?? CreateRange(ref _u1800, first: '\u1800', last: '\u18AF');
-        private static UnicodeRange _u1800;
+        private static UnicodeRange? _u1800;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Unified Canadian Aboriginal Syllabics Extended' Unicode block (U+18B0..U+18FF).
@@ -457,7 +459,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U18B0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange UnifiedCanadianAboriginalSyllabicsExtended => _u18B0 ?? CreateRange(ref _u18B0, first: '\u18B0', last: '\u18FF');
-        private static UnicodeRange _u18B0;
+        private static UnicodeRange? _u18B0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Limbu' Unicode block (U+1900..U+194F).
@@ -466,7 +468,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1900.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Limbu => _u1900 ?? CreateRange(ref _u1900, first: '\u1900', last: '\u194F');
-        private static UnicodeRange _u1900;
+        private static UnicodeRange? _u1900;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tai Le' Unicode block (U+1950..U+197F).
@@ -475,7 +477,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1950.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange TaiLe => _u1950 ?? CreateRange(ref _u1950, first: '\u1950', last: '\u197F');
-        private static UnicodeRange _u1950;
+        private static UnicodeRange? _u1950;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'New Tai Lue' Unicode block (U+1980..U+19DF).
@@ -484,7 +486,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1980.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange NewTaiLue => _u1980 ?? CreateRange(ref _u1980, first: '\u1980', last: '\u19DF');
-        private static UnicodeRange _u1980;
+        private static UnicodeRange? _u1980;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Khmer Symbols' Unicode block (U+19E0..U+19FF).
@@ -493,7 +495,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U19E0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange KhmerSymbols => _u19E0 ?? CreateRange(ref _u19E0, first: '\u19E0', last: '\u19FF');
-        private static UnicodeRange _u19E0;
+        private static UnicodeRange? _u19E0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Buginese' Unicode block (U+1A00..U+1A1F).
@@ -502,7 +504,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1A00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Buginese => _u1A00 ?? CreateRange(ref _u1A00, first: '\u1A00', last: '\u1A1F');
-        private static UnicodeRange _u1A00;
+        private static UnicodeRange? _u1A00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tai Tham' Unicode block (U+1A20..U+1AAF).
@@ -511,7 +513,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1A20.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange TaiTham => _u1A20 ?? CreateRange(ref _u1A20, first: '\u1A20', last: '\u1AAF');
-        private static UnicodeRange _u1A20;
+        private static UnicodeRange? _u1A20;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Combining Diacritical Marks Extended' Unicode block (U+1AB0..U+1AFF).
@@ -520,7 +522,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1AB0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CombiningDiacriticalMarksExtended => _u1AB0 ?? CreateRange(ref _u1AB0, first: '\u1AB0', last: '\u1AFF');
-        private static UnicodeRange _u1AB0;
+        private static UnicodeRange? _u1AB0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Balinese' Unicode block (U+1B00..U+1B7F).
@@ -529,7 +531,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1B00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Balinese => _u1B00 ?? CreateRange(ref _u1B00, first: '\u1B00', last: '\u1B7F');
-        private static UnicodeRange _u1B00;
+        private static UnicodeRange? _u1B00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Sundanese' Unicode block (U+1B80..U+1BBF).
@@ -538,7 +540,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1B80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Sundanese => _u1B80 ?? CreateRange(ref _u1B80, first: '\u1B80', last: '\u1BBF');
-        private static UnicodeRange _u1B80;
+        private static UnicodeRange? _u1B80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Batak' Unicode block (U+1BC0..U+1BFF).
@@ -547,7 +549,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1BC0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Batak => _u1BC0 ?? CreateRange(ref _u1BC0, first: '\u1BC0', last: '\u1BFF');
-        private static UnicodeRange _u1BC0;
+        private static UnicodeRange? _u1BC0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Lepcha' Unicode block (U+1C00..U+1C4F).
@@ -556,7 +558,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1C00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Lepcha => _u1C00 ?? CreateRange(ref _u1C00, first: '\u1C00', last: '\u1C4F');
-        private static UnicodeRange _u1C00;
+        private static UnicodeRange? _u1C00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ol Chiki' Unicode block (U+1C50..U+1C7F).
@@ -565,7 +567,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1C50.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange OlChiki => _u1C50 ?? CreateRange(ref _u1C50, first: '\u1C50', last: '\u1C7F');
-        private static UnicodeRange _u1C50;
+        private static UnicodeRange? _u1C50;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cyrillic Extended-C' Unicode block (U+1C80..U+1C8F).
@@ -574,7 +576,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1C80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CyrillicExtendedC => _u1C80 ?? CreateRange(ref _u1C80, first: '\u1C80', last: '\u1C8F');
-        private static UnicodeRange _u1C80;
+        private static UnicodeRange? _u1C80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Georgian Extended' Unicode block (U+1C90..U+1CBF).
@@ -583,7 +585,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1C90.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GeorgianExtended => _u1C90 ?? CreateRange(ref _u1C90, first: '\u1C90', last: '\u1CBF');
-        private static UnicodeRange _u1C90;
+        private static UnicodeRange? _u1C90;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Sundanese Supplement' Unicode block (U+1CC0..U+1CCF).
@@ -592,7 +594,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1CC0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SundaneseSupplement => _u1CC0 ?? CreateRange(ref _u1CC0, first: '\u1CC0', last: '\u1CCF');
-        private static UnicodeRange _u1CC0;
+        private static UnicodeRange? _u1CC0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Vedic Extensions' Unicode block (U+1CD0..U+1CFF).
@@ -601,7 +603,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1CD0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange VedicExtensions => _u1CD0 ?? CreateRange(ref _u1CD0, first: '\u1CD0', last: '\u1CFF');
-        private static UnicodeRange _u1CD0;
+        private static UnicodeRange? _u1CD0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Phonetic Extensions' Unicode block (U+1D00..U+1D7F).
@@ -610,7 +612,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1D00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange PhoneticExtensions => _u1D00 ?? CreateRange(ref _u1D00, first: '\u1D00', last: '\u1D7F');
-        private static UnicodeRange _u1D00;
+        private static UnicodeRange? _u1D00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Phonetic Extensions Supplement' Unicode block (U+1D80..U+1DBF).
@@ -619,7 +621,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1D80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange PhoneticExtensionsSupplement => _u1D80 ?? CreateRange(ref _u1D80, first: '\u1D80', last: '\u1DBF');
-        private static UnicodeRange _u1D80;
+        private static UnicodeRange? _u1D80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Combining Diacritical Marks Supplement' Unicode block (U+1DC0..U+1DFF).
@@ -628,7 +630,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1DC0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CombiningDiacriticalMarksSupplement => _u1DC0 ?? CreateRange(ref _u1DC0, first: '\u1DC0', last: '\u1DFF');
-        private static UnicodeRange _u1DC0;
+        private static UnicodeRange? _u1DC0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended Additional' Unicode block (U+1E00..U+1EFF).
@@ -637,7 +639,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1E00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedAdditional => _u1E00 ?? CreateRange(ref _u1E00, first: '\u1E00', last: '\u1EFF');
-        private static UnicodeRange _u1E00;
+        private static UnicodeRange? _u1E00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Greek Extended' Unicode block (U+1F00..U+1FFF).
@@ -646,7 +648,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U1F00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GreekExtended => _u1F00 ?? CreateRange(ref _u1F00, first: '\u1F00', last: '\u1FFF');
-        private static UnicodeRange _u1F00;
+        private static UnicodeRange? _u1F00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'General Punctuation' Unicode block (U+2000..U+206F).
@@ -655,7 +657,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2000.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GeneralPunctuation => _u2000 ?? CreateRange(ref _u2000, first: '\u2000', last: '\u206F');
-        private static UnicodeRange _u2000;
+        private static UnicodeRange? _u2000;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Superscripts and Subscripts' Unicode block (U+2070..U+209F).
@@ -664,7 +666,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2070.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SuperscriptsandSubscripts => _u2070 ?? CreateRange(ref _u2070, first: '\u2070', last: '\u209F');
-        private static UnicodeRange _u2070;
+        private static UnicodeRange? _u2070;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Currency Symbols' Unicode block (U+20A0..U+20CF).
@@ -673,7 +675,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U20A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CurrencySymbols => _u20A0 ?? CreateRange(ref _u20A0, first: '\u20A0', last: '\u20CF');
-        private static UnicodeRange _u20A0;
+        private static UnicodeRange? _u20A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Combining Diacritical Marks for Symbols' Unicode block (U+20D0..U+20FF).
@@ -682,7 +684,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U20D0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CombiningDiacriticalMarksforSymbols => _u20D0 ?? CreateRange(ref _u20D0, first: '\u20D0', last: '\u20FF');
-        private static UnicodeRange _u20D0;
+        private static UnicodeRange? _u20D0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Letterlike Symbols' Unicode block (U+2100..U+214F).
@@ -691,7 +693,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2100.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LetterlikeSymbols => _u2100 ?? CreateRange(ref _u2100, first: '\u2100', last: '\u214F');
-        private static UnicodeRange _u2100;
+        private static UnicodeRange? _u2100;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Number Forms' Unicode block (U+2150..U+218F).
@@ -700,7 +702,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2150.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange NumberForms => _u2150 ?? CreateRange(ref _u2150, first: '\u2150', last: '\u218F');
-        private static UnicodeRange _u2150;
+        private static UnicodeRange? _u2150;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arrows' Unicode block (U+2190..U+21FF).
@@ -709,7 +711,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2190.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Arrows => _u2190 ?? CreateRange(ref _u2190, first: '\u2190', last: '\u21FF');
-        private static UnicodeRange _u2190;
+        private static UnicodeRange? _u2190;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Mathematical Operators' Unicode block (U+2200..U+22FF).
@@ -718,7 +720,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2200.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MathematicalOperators => _u2200 ?? CreateRange(ref _u2200, first: '\u2200', last: '\u22FF');
-        private static UnicodeRange _u2200;
+        private static UnicodeRange? _u2200;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Miscellaneous Technical' Unicode block (U+2300..U+23FF).
@@ -727,7 +729,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2300.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MiscellaneousTechnical => _u2300 ?? CreateRange(ref _u2300, first: '\u2300', last: '\u23FF');
-        private static UnicodeRange _u2300;
+        private static UnicodeRange? _u2300;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Control Pictures' Unicode block (U+2400..U+243F).
@@ -736,7 +738,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2400.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ControlPictures => _u2400 ?? CreateRange(ref _u2400, first: '\u2400', last: '\u243F');
-        private static UnicodeRange _u2400;
+        private static UnicodeRange? _u2400;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Optical Character Recognition' Unicode block (U+2440..U+245F).
@@ -745,7 +747,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2440.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange OpticalCharacterRecognition => _u2440 ?? CreateRange(ref _u2440, first: '\u2440', last: '\u245F');
-        private static UnicodeRange _u2440;
+        private static UnicodeRange? _u2440;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Enclosed Alphanumerics' Unicode block (U+2460..U+24FF).
@@ -754,7 +756,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2460.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange EnclosedAlphanumerics => _u2460 ?? CreateRange(ref _u2460, first: '\u2460', last: '\u24FF');
-        private static UnicodeRange _u2460;
+        private static UnicodeRange? _u2460;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Box Drawing' Unicode block (U+2500..U+257F).
@@ -763,7 +765,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2500.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange BoxDrawing => _u2500 ?? CreateRange(ref _u2500, first: '\u2500', last: '\u257F');
-        private static UnicodeRange _u2500;
+        private static UnicodeRange? _u2500;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Block Elements' Unicode block (U+2580..U+259F).
@@ -772,7 +774,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2580.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange BlockElements => _u2580 ?? CreateRange(ref _u2580, first: '\u2580', last: '\u259F');
-        private static UnicodeRange _u2580;
+        private static UnicodeRange? _u2580;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Geometric Shapes' Unicode block (U+25A0..U+25FF).
@@ -781,7 +783,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U25A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GeometricShapes => _u25A0 ?? CreateRange(ref _u25A0, first: '\u25A0', last: '\u25FF');
-        private static UnicodeRange _u25A0;
+        private static UnicodeRange? _u25A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Miscellaneous Symbols' Unicode block (U+2600..U+26FF).
@@ -790,7 +792,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2600.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MiscellaneousSymbols => _u2600 ?? CreateRange(ref _u2600, first: '\u2600', last: '\u26FF');
-        private static UnicodeRange _u2600;
+        private static UnicodeRange? _u2600;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Dingbats' Unicode block (U+2700..U+27BF).
@@ -799,7 +801,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2700.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Dingbats => _u2700 ?? CreateRange(ref _u2700, first: '\u2700', last: '\u27BF');
-        private static UnicodeRange _u2700;
+        private static UnicodeRange? _u2700;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Miscellaneous Mathematical Symbols-A' Unicode block (U+27C0..U+27EF).
@@ -808,7 +810,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U27C0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MiscellaneousMathematicalSymbolsA => _u27C0 ?? CreateRange(ref _u27C0, first: '\u27C0', last: '\u27EF');
-        private static UnicodeRange _u27C0;
+        private static UnicodeRange? _u27C0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Supplemental Arrows-A' Unicode block (U+27F0..U+27FF).
@@ -817,7 +819,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U27F0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SupplementalArrowsA => _u27F0 ?? CreateRange(ref _u27F0, first: '\u27F0', last: '\u27FF');
-        private static UnicodeRange _u27F0;
+        private static UnicodeRange? _u27F0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Braille Patterns' Unicode block (U+2800..U+28FF).
@@ -826,7 +828,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2800.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange BraillePatterns => _u2800 ?? CreateRange(ref _u2800, first: '\u2800', last: '\u28FF');
-        private static UnicodeRange _u2800;
+        private static UnicodeRange? _u2800;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Supplemental Arrows-B' Unicode block (U+2900..U+297F).
@@ -835,7 +837,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2900.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SupplementalArrowsB => _u2900 ?? CreateRange(ref _u2900, first: '\u2900', last: '\u297F');
-        private static UnicodeRange _u2900;
+        private static UnicodeRange? _u2900;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Miscellaneous Mathematical Symbols-B' Unicode block (U+2980..U+29FF).
@@ -844,7 +846,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2980.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MiscellaneousMathematicalSymbolsB => _u2980 ?? CreateRange(ref _u2980, first: '\u2980', last: '\u29FF');
-        private static UnicodeRange _u2980;
+        private static UnicodeRange? _u2980;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Supplemental Mathematical Operators' Unicode block (U+2A00..U+2AFF).
@@ -853,7 +855,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2A00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SupplementalMathematicalOperators => _u2A00 ?? CreateRange(ref _u2A00, first: '\u2A00', last: '\u2AFF');
-        private static UnicodeRange _u2A00;
+        private static UnicodeRange? _u2A00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Miscellaneous Symbols and Arrows' Unicode block (U+2B00..U+2BFF).
@@ -862,7 +864,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2B00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MiscellaneousSymbolsandArrows => _u2B00 ?? CreateRange(ref _u2B00, first: '\u2B00', last: '\u2BFF');
-        private static UnicodeRange _u2B00;
+        private static UnicodeRange? _u2B00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Glagolitic' Unicode block (U+2C00..U+2C5F).
@@ -871,7 +873,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2C00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Glagolitic => _u2C00 ?? CreateRange(ref _u2C00, first: '\u2C00', last: '\u2C5F');
-        private static UnicodeRange _u2C00;
+        private static UnicodeRange? _u2C00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended-C' Unicode block (U+2C60..U+2C7F).
@@ -880,7 +882,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2C60.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedC => _u2C60 ?? CreateRange(ref _u2C60, first: '\u2C60', last: '\u2C7F');
-        private static UnicodeRange _u2C60;
+        private static UnicodeRange? _u2C60;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Coptic' Unicode block (U+2C80..U+2CFF).
@@ -889,7 +891,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2C80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Coptic => _u2C80 ?? CreateRange(ref _u2C80, first: '\u2C80', last: '\u2CFF');
-        private static UnicodeRange _u2C80;
+        private static UnicodeRange? _u2C80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Georgian Supplement' Unicode block (U+2D00..U+2D2F).
@@ -898,7 +900,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2D00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange GeorgianSupplement => _u2D00 ?? CreateRange(ref _u2D00, first: '\u2D00', last: '\u2D2F');
-        private static UnicodeRange _u2D00;
+        private static UnicodeRange? _u2D00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tifinagh' Unicode block (U+2D30..U+2D7F).
@@ -907,7 +909,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2D30.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Tifinagh => _u2D30 ?? CreateRange(ref _u2D30, first: '\u2D30', last: '\u2D7F');
-        private static UnicodeRange _u2D30;
+        private static UnicodeRange? _u2D30;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ethiopic Extended' Unicode block (U+2D80..U+2DDF).
@@ -916,7 +918,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2D80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange EthiopicExtended => _u2D80 ?? CreateRange(ref _u2D80, first: '\u2D80', last: '\u2DDF');
-        private static UnicodeRange _u2D80;
+        private static UnicodeRange? _u2D80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cyrillic Extended-A' Unicode block (U+2DE0..U+2DFF).
@@ -925,7 +927,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2DE0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CyrillicExtendedA => _u2DE0 ?? CreateRange(ref _u2DE0, first: '\u2DE0', last: '\u2DFF');
-        private static UnicodeRange _u2DE0;
+        private static UnicodeRange? _u2DE0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Supplemental Punctuation' Unicode block (U+2E00..U+2E7F).
@@ -934,7 +936,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2E00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SupplementalPunctuation => _u2E00 ?? CreateRange(ref _u2E00, first: '\u2E00', last: '\u2E7F');
-        private static UnicodeRange _u2E00;
+        private static UnicodeRange? _u2E00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Radicals Supplement' Unicode block (U+2E80..U+2EFF).
@@ -943,7 +945,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2E80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkRadicalsSupplement => _u2E80 ?? CreateRange(ref _u2E80, first: '\u2E80', last: '\u2EFF');
-        private static UnicodeRange _u2E80;
+        private static UnicodeRange? _u2E80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Kangxi Radicals' Unicode block (U+2F00..U+2FDF).
@@ -952,7 +954,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2F00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange KangxiRadicals => _u2F00 ?? CreateRange(ref _u2F00, first: '\u2F00', last: '\u2FDF');
-        private static UnicodeRange _u2F00;
+        private static UnicodeRange? _u2F00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ideographic Description Characters' Unicode block (U+2FF0..U+2FFF).
@@ -961,7 +963,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U2FF0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange IdeographicDescriptionCharacters => _u2FF0 ?? CreateRange(ref _u2FF0, first: '\u2FF0', last: '\u2FFF');
-        private static UnicodeRange _u2FF0;
+        private static UnicodeRange? _u2FF0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Symbols and Punctuation' Unicode block (U+3000..U+303F).
@@ -970,7 +972,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3000.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkSymbolsandPunctuation => _u3000 ?? CreateRange(ref _u3000, first: '\u3000', last: '\u303F');
-        private static UnicodeRange _u3000;
+        private static UnicodeRange? _u3000;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hiragana' Unicode block (U+3040..U+309F).
@@ -979,7 +981,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3040.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Hiragana => _u3040 ?? CreateRange(ref _u3040, first: '\u3040', last: '\u309F');
-        private static UnicodeRange _u3040;
+        private static UnicodeRange? _u3040;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Katakana' Unicode block (U+30A0..U+30FF).
@@ -988,7 +990,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U30A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Katakana => _u30A0 ?? CreateRange(ref _u30A0, first: '\u30A0', last: '\u30FF');
-        private static UnicodeRange _u30A0;
+        private static UnicodeRange? _u30A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Bopomofo' Unicode block (U+3100..U+312F).
@@ -997,7 +999,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3100.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Bopomofo => _u3100 ?? CreateRange(ref _u3100, first: '\u3100', last: '\u312F');
-        private static UnicodeRange _u3100;
+        private static UnicodeRange? _u3100;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hangul Compatibility Jamo' Unicode block (U+3130..U+318F).
@@ -1006,7 +1008,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3130.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HangulCompatibilityJamo => _u3130 ?? CreateRange(ref _u3130, first: '\u3130', last: '\u318F');
-        private static UnicodeRange _u3130;
+        private static UnicodeRange? _u3130;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Kanbun' Unicode block (U+3190..U+319F).
@@ -1015,7 +1017,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3190.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Kanbun => _u3190 ?? CreateRange(ref _u3190, first: '\u3190', last: '\u319F');
-        private static UnicodeRange _u3190;
+        private static UnicodeRange? _u3190;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Bopomofo Extended' Unicode block (U+31A0..U+31BF).
@@ -1024,7 +1026,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U31A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange BopomofoExtended => _u31A0 ?? CreateRange(ref _u31A0, first: '\u31A0', last: '\u31BF');
-        private static UnicodeRange _u31A0;
+        private static UnicodeRange? _u31A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Strokes' Unicode block (U+31C0..U+31EF).
@@ -1033,7 +1035,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U31C0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkStrokes => _u31C0 ?? CreateRange(ref _u31C0, first: '\u31C0', last: '\u31EF');
-        private static UnicodeRange _u31C0;
+        private static UnicodeRange? _u31C0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Katakana Phonetic Extensions' Unicode block (U+31F0..U+31FF).
@@ -1042,7 +1044,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U31F0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange KatakanaPhoneticExtensions => _u31F0 ?? CreateRange(ref _u31F0, first: '\u31F0', last: '\u31FF');
-        private static UnicodeRange _u31F0;
+        private static UnicodeRange? _u31F0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Enclosed CJK Letters and Months' Unicode block (U+3200..U+32FF).
@@ -1051,7 +1053,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3200.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange EnclosedCjkLettersandMonths => _u3200 ?? CreateRange(ref _u3200, first: '\u3200', last: '\u32FF');
-        private static UnicodeRange _u3200;
+        private static UnicodeRange? _u3200;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Compatibility' Unicode block (U+3300..U+33FF).
@@ -1060,7 +1062,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3300.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkCompatibility => _u3300 ?? CreateRange(ref _u3300, first: '\u3300', last: '\u33FF');
-        private static UnicodeRange _u3300;
+        private static UnicodeRange? _u3300;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Unified Ideographs Extension A' Unicode block (U+3400..U+4DBF).
@@ -1069,7 +1071,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U3400.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkUnifiedIdeographsExtensionA => _u3400 ?? CreateRange(ref _u3400, first: '\u3400', last: '\u4DBF');
-        private static UnicodeRange _u3400;
+        private static UnicodeRange? _u3400;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Yijing Hexagram Symbols' Unicode block (U+4DC0..U+4DFF).
@@ -1078,7 +1080,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U4DC0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange YijingHexagramSymbols => _u4DC0 ?? CreateRange(ref _u4DC0, first: '\u4DC0', last: '\u4DFF');
-        private static UnicodeRange _u4DC0;
+        private static UnicodeRange? _u4DC0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Unified Ideographs' Unicode block (U+4E00..U+9FFF).
@@ -1087,7 +1089,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/U4E00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkUnifiedIdeographs => _u4E00 ?? CreateRange(ref _u4E00, first: '\u4E00', last: '\u9FFF');
-        private static UnicodeRange _u4E00;
+        private static UnicodeRange? _u4E00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Yi Syllables' Unicode block (U+A000..U+A48F).
@@ -1096,7 +1098,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA000.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange YiSyllables => _uA000 ?? CreateRange(ref _uA000, first: '\uA000', last: '\uA48F');
-        private static UnicodeRange _uA000;
+        private static UnicodeRange? _uA000;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Yi Radicals' Unicode block (U+A490..U+A4CF).
@@ -1105,7 +1107,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA490.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange YiRadicals => _uA490 ?? CreateRange(ref _uA490, first: '\uA490', last: '\uA4CF');
-        private static UnicodeRange _uA490;
+        private static UnicodeRange? _uA490;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Lisu' Unicode block (U+A4D0..U+A4FF).
@@ -1114,7 +1116,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA4D0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Lisu => _uA4D0 ?? CreateRange(ref _uA4D0, first: '\uA4D0', last: '\uA4FF');
-        private static UnicodeRange _uA4D0;
+        private static UnicodeRange? _uA4D0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Vai' Unicode block (U+A500..U+A63F).
@@ -1123,7 +1125,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA500.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Vai => _uA500 ?? CreateRange(ref _uA500, first: '\uA500', last: '\uA63F');
-        private static UnicodeRange _uA500;
+        private static UnicodeRange? _uA500;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cyrillic Extended-B' Unicode block (U+A640..U+A69F).
@@ -1132,7 +1134,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA640.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CyrillicExtendedB => _uA640 ?? CreateRange(ref _uA640, first: '\uA640', last: '\uA69F');
-        private static UnicodeRange _uA640;
+        private static UnicodeRange? _uA640;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Bamum' Unicode block (U+A6A0..U+A6FF).
@@ -1141,7 +1143,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA6A0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Bamum => _uA6A0 ?? CreateRange(ref _uA6A0, first: '\uA6A0', last: '\uA6FF');
-        private static UnicodeRange _uA6A0;
+        private static UnicodeRange? _uA6A0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Modifier Tone Letters' Unicode block (U+A700..U+A71F).
@@ -1150,7 +1152,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA700.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ModifierToneLetters => _uA700 ?? CreateRange(ref _uA700, first: '\uA700', last: '\uA71F');
-        private static UnicodeRange _uA700;
+        private static UnicodeRange? _uA700;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended-D' Unicode block (U+A720..U+A7FF).
@@ -1159,7 +1161,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA720.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedD => _uA720 ?? CreateRange(ref _uA720, first: '\uA720', last: '\uA7FF');
-        private static UnicodeRange _uA720;
+        private static UnicodeRange? _uA720;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Syloti Nagri' Unicode block (U+A800..U+A82F).
@@ -1168,7 +1170,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA800.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SylotiNagri => _uA800 ?? CreateRange(ref _uA800, first: '\uA800', last: '\uA82F');
-        private static UnicodeRange _uA800;
+        private static UnicodeRange? _uA800;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Common Indic Number Forms' Unicode block (U+A830..U+A83F).
@@ -1177,7 +1179,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA830.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CommonIndicNumberForms => _uA830 ?? CreateRange(ref _uA830, first: '\uA830', last: '\uA83F');
-        private static UnicodeRange _uA830;
+        private static UnicodeRange? _uA830;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Phags-pa' Unicode block (U+A840..U+A87F).
@@ -1186,7 +1188,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA840.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Phagspa => _uA840 ?? CreateRange(ref _uA840, first: '\uA840', last: '\uA87F');
-        private static UnicodeRange _uA840;
+        private static UnicodeRange? _uA840;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Saurashtra' Unicode block (U+A880..U+A8DF).
@@ -1195,7 +1197,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA880.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Saurashtra => _uA880 ?? CreateRange(ref _uA880, first: '\uA880', last: '\uA8DF');
-        private static UnicodeRange _uA880;
+        private static UnicodeRange? _uA880;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Devanagari Extended' Unicode block (U+A8E0..U+A8FF).
@@ -1204,7 +1206,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA8E0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange DevanagariExtended => _uA8E0 ?? CreateRange(ref _uA8E0, first: '\uA8E0', last: '\uA8FF');
-        private static UnicodeRange _uA8E0;
+        private static UnicodeRange? _uA8E0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Kayah Li' Unicode block (U+A900..U+A92F).
@@ -1213,7 +1215,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA900.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange KayahLi => _uA900 ?? CreateRange(ref _uA900, first: '\uA900', last: '\uA92F');
-        private static UnicodeRange _uA900;
+        private static UnicodeRange? _uA900;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Rejang' Unicode block (U+A930..U+A95F).
@@ -1222,7 +1224,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA930.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Rejang => _uA930 ?? CreateRange(ref _uA930, first: '\uA930', last: '\uA95F');
-        private static UnicodeRange _uA930;
+        private static UnicodeRange? _uA930;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hangul Jamo Extended-A' Unicode block (U+A960..U+A97F).
@@ -1231,7 +1233,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA960.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HangulJamoExtendedA => _uA960 ?? CreateRange(ref _uA960, first: '\uA960', last: '\uA97F');
-        private static UnicodeRange _uA960;
+        private static UnicodeRange? _uA960;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Javanese' Unicode block (U+A980..U+A9DF).
@@ -1240,7 +1242,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA980.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Javanese => _uA980 ?? CreateRange(ref _uA980, first: '\uA980', last: '\uA9DF');
-        private static UnicodeRange _uA980;
+        private static UnicodeRange? _uA980;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Myanmar Extended-B' Unicode block (U+A9E0..U+A9FF).
@@ -1249,7 +1251,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UA9E0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MyanmarExtendedB => _uA9E0 ?? CreateRange(ref _uA9E0, first: '\uA9E0', last: '\uA9FF');
-        private static UnicodeRange _uA9E0;
+        private static UnicodeRange? _uA9E0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cham' Unicode block (U+AA00..U+AA5F).
@@ -1258,7 +1260,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAA00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Cham => _uAA00 ?? CreateRange(ref _uAA00, first: '\uAA00', last: '\uAA5F');
-        private static UnicodeRange _uAA00;
+        private static UnicodeRange? _uAA00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Myanmar Extended-A' Unicode block (U+AA60..U+AA7F).
@@ -1267,7 +1269,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAA60.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MyanmarExtendedA => _uAA60 ?? CreateRange(ref _uAA60, first: '\uAA60', last: '\uAA7F');
-        private static UnicodeRange _uAA60;
+        private static UnicodeRange? _uAA60;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Tai Viet' Unicode block (U+AA80..U+AADF).
@@ -1276,7 +1278,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAA80.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange TaiViet => _uAA80 ?? CreateRange(ref _uAA80, first: '\uAA80', last: '\uAADF');
-        private static UnicodeRange _uAA80;
+        private static UnicodeRange? _uAA80;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Meetei Mayek Extensions' Unicode block (U+AAE0..U+AAFF).
@@ -1285,7 +1287,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAAE0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MeeteiMayekExtensions => _uAAE0 ?? CreateRange(ref _uAAE0, first: '\uAAE0', last: '\uAAFF');
-        private static UnicodeRange _uAAE0;
+        private static UnicodeRange? _uAAE0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Ethiopic Extended-A' Unicode block (U+AB00..U+AB2F).
@@ -1294,7 +1296,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAB00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange EthiopicExtendedA => _uAB00 ?? CreateRange(ref _uAB00, first: '\uAB00', last: '\uAB2F');
-        private static UnicodeRange _uAB00;
+        private static UnicodeRange? _uAB00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Latin Extended-E' Unicode block (U+AB30..U+AB6F).
@@ -1303,7 +1305,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAB30.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange LatinExtendedE => _uAB30 ?? CreateRange(ref _uAB30, first: '\uAB30', last: '\uAB6F');
-        private static UnicodeRange _uAB30;
+        private static UnicodeRange? _uAB30;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Cherokee Supplement' Unicode block (U+AB70..U+ABBF).
@@ -1312,7 +1314,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAB70.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CherokeeSupplement => _uAB70 ?? CreateRange(ref _uAB70, first: '\uAB70', last: '\uABBF');
-        private static UnicodeRange _uAB70;
+        private static UnicodeRange? _uAB70;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Meetei Mayek' Unicode block (U+ABC0..U+ABFF).
@@ -1321,7 +1323,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UABC0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange MeeteiMayek => _uABC0 ?? CreateRange(ref _uABC0, first: '\uABC0', last: '\uABFF');
-        private static UnicodeRange _uABC0;
+        private static UnicodeRange? _uABC0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hangul Syllables' Unicode block (U+AC00..U+D7AF).
@@ -1330,7 +1332,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UAC00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HangulSyllables => _uAC00 ?? CreateRange(ref _uAC00, first: '\uAC00', last: '\uD7AF');
-        private static UnicodeRange _uAC00;
+        private static UnicodeRange? _uAC00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Hangul Jamo Extended-B' Unicode block (U+D7B0..U+D7FF).
@@ -1339,7 +1341,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UD7B0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HangulJamoExtendedB => _uD7B0 ?? CreateRange(ref _uD7B0, first: '\uD7B0', last: '\uD7FF');
-        private static UnicodeRange _uD7B0;
+        private static UnicodeRange? _uD7B0;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Compatibility Ideographs' Unicode block (U+F900..U+FAFF).
@@ -1348,7 +1350,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UF900.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkCompatibilityIdeographs => _uF900 ?? CreateRange(ref _uF900, first: '\uF900', last: '\uFAFF');
-        private static UnicodeRange _uF900;
+        private static UnicodeRange? _uF900;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Alphabetic Presentation Forms' Unicode block (U+FB00..U+FB4F).
@@ -1357,7 +1359,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFB00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange AlphabeticPresentationForms => _uFB00 ?? CreateRange(ref _uFB00, first: '\uFB00', last: '\uFB4F');
-        private static UnicodeRange _uFB00;
+        private static UnicodeRange? _uFB00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arabic Presentation Forms-A' Unicode block (U+FB50..U+FDFF).
@@ -1366,7 +1368,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFB50.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ArabicPresentationFormsA => _uFB50 ?? CreateRange(ref _uFB50, first: '\uFB50', last: '\uFDFF');
-        private static UnicodeRange _uFB50;
+        private static UnicodeRange? _uFB50;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Variation Selectors' Unicode block (U+FE00..U+FE0F).
@@ -1375,7 +1377,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange VariationSelectors => _uFE00 ?? CreateRange(ref _uFE00, first: '\uFE00', last: '\uFE0F');
-        private static UnicodeRange _uFE00;
+        private static UnicodeRange? _uFE00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Vertical Forms' Unicode block (U+FE10..U+FE1F).
@@ -1384,7 +1386,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE10.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange VerticalForms => _uFE10 ?? CreateRange(ref _uFE10, first: '\uFE10', last: '\uFE1F');
-        private static UnicodeRange _uFE10;
+        private static UnicodeRange? _uFE10;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Combining Half Marks' Unicode block (U+FE20..U+FE2F).
@@ -1393,7 +1395,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE20.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CombiningHalfMarks => _uFE20 ?? CreateRange(ref _uFE20, first: '\uFE20', last: '\uFE2F');
-        private static UnicodeRange _uFE20;
+        private static UnicodeRange? _uFE20;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'CJK Compatibility Forms' Unicode block (U+FE30..U+FE4F).
@@ -1402,7 +1404,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE30.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange CjkCompatibilityForms => _uFE30 ?? CreateRange(ref _uFE30, first: '\uFE30', last: '\uFE4F');
-        private static UnicodeRange _uFE30;
+        private static UnicodeRange? _uFE30;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Small Form Variants' Unicode block (U+FE50..U+FE6F).
@@ -1411,7 +1413,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE50.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange SmallFormVariants => _uFE50 ?? CreateRange(ref _uFE50, first: '\uFE50', last: '\uFE6F');
-        private static UnicodeRange _uFE50;
+        private static UnicodeRange? _uFE50;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Arabic Presentation Forms-B' Unicode block (U+FE70..U+FEFF).
@@ -1420,7 +1422,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFE70.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange ArabicPresentationFormsB => _uFE70 ?? CreateRange(ref _uFE70, first: '\uFE70', last: '\uFEFF');
-        private static UnicodeRange _uFE70;
+        private static UnicodeRange? _uFE70;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Halfwidth and Fullwidth Forms' Unicode block (U+FF00..U+FFEF).
@@ -1429,7 +1431,7 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFF00.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange HalfwidthandFullwidthForms => _uFF00 ?? CreateRange(ref _uFF00, first: '\uFF00', last: '\uFFEF');
-        private static UnicodeRange _uFF00;
+        private static UnicodeRange? _uFF00;
 
         /// <summary>
         /// A <see cref="UnicodeRange"/> corresponding to the 'Specials' Unicode block (U+FFF0..U+FFFF).
@@ -1438,6 +1440,6 @@ namespace System.Text.Unicode
         /// See http://www.unicode.org/charts/PDF/UFFF0.pdf for the full set of characters in this block.
         /// </remarks>
         public static UnicodeRange Specials => _uFFF0 ?? CreateRange(ref _uFFF0, first: '\uFFF0', last: '\uFFFF');
-        private static UnicodeRange _uFFF0;
+        private static UnicodeRange? _uFFF0;
     }
 }
index 83a5e6d0dadd11cecfbc67fe97749fa0fd88358f..df5c676c6136fed54f7e451182eca2b6dac355db 100644 (file)
@@ -36,6 +36,8 @@ namespace GenDefinedCharList
             StringBuilder runtimeCodeBuilder = new StringBuilder();
             WriteCopyrightAndHeader(runtimeCodeBuilder);
             runtimeCodeBuilder.AppendLine();
+            runtimeCodeBuilder.AppendLine("#nullable enable");
+            runtimeCodeBuilder.AppendLine();
             runtimeCodeBuilder.AppendLine("namespace System.Text.Unicode");
             runtimeCodeBuilder.AppendLine("{");
             runtimeCodeBuilder.AppendLine("    public static partial class UnicodeRanges");
@@ -102,7 +104,7 @@ namespace GenDefinedCharList
                 runtimeCodeBuilder.AppendLine(Invariant($"        /// See http://www.unicode.org/charts/PDF/U{startCode}.pdf for the full set of characters in this block."));
                 runtimeCodeBuilder.AppendLine(Invariant($"        /// </remarks>"));
                 runtimeCodeBuilder.AppendLine(Invariant($"        public static UnicodeRange {blockNameAsProperty} => {blockNameAsField} ?? CreateRange(ref {blockNameAsField}, first: '\\u{startCode}', last: '\\u{endCode}');"));
-                runtimeCodeBuilder.AppendLine(Invariant($"        private static UnicodeRange {blockNameAsField};"));
+                runtimeCodeBuilder.AppendLine(Invariant($"        private static UnicodeRange? {blockNameAsField};"));
 
                 testCodeBuilder.AppendLine(Invariant($"            new object[] {{ '\\u{startCode}', '\\u{endCode}', nameof(UnicodeRanges.{blockNameAsProperty}) }},"));
             }