Repository: AvaloniaUI/Avalonia
File: src/Avalonia.Base/Media/TextFormatting/Unicode/BiDi.trie.cs (C#)

Code before:
//---------------------------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by UnicodeDataGenerator.
//     Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>"
//---------------------------------------------------------------------------------------------------

using System;
using System.Runtime.CompilerServices;

namespace Avalonia.Media.TextFormatting.Unicode;

internal static class BidiTrie
{
    public static UnicodeTrie Trie
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        get => new(Data, 0x00100000, 0x00000000);
    } 
    
    private static readonly uint[] Data = new uint[]
    {
        0x0000038D, 0x00000395, 0x0000039D, 0x000003A5, 0x000003BD, 0x000003C5, 0x000003CD, 0x000003D5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 
        0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003DB, 0x000003E3, 0x000003EB, 0x000003F3, 
        0x000003FB, 0x00000403, 0x000003FF, 0x00000407, 0x0000040F, 0x00000417, 0x00000412, 0x0000041A, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 
        0x00000422, 0x0000042A, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x00000430, 0x00000438, 0x00000440, 0x00000448, 
        0x00000450, 0x00000458, 0x0000045E, 0x00000466, 0x0000046B, 0x00000473, 0x00000476, 0x0000047E, 0x00000485, 0x0000048D, 0x00000493, 0x0000049B, 
        0x0000049A, 0x000004A2, 0x000004AA, 0x000004B2, 0x00000972, 0x00000979, 0x00000981, 0x00000C54, 0x00000AE1, 0x00000457, 0x00000C27, 0x00000AE9, 
        0x000004BA, 0x000004BC, 0x000004C4, 0x000004CC, 0x000004D4, 0x000004D5, 0x000004DD, 0x000004E5, 0x000004ED, 0x000004D5, 0x000004F5, 0x000004FA, 
        0x000004ED, 0x000004D5, 0x00000502, 0x0000050A, 0x000004D4, 0x00000512, 0x0000051A, 0x000004CC, 0x00000522, 0x000003AD, 0x0000052A, 0x0000052E, 
        0x00000536, 0x00000538, 0x00000540, 0x00000548, 0x000004D4, 0x000004D5, 0x00000550, 0x000004CC, 0x00000424, 0x00000554, 0x000004DD, 0x000004CC, 
        0x000004D4, 0x000003AD, 0x0000055C, 0x000003AD, 0x000003AD, 0x00000562, 0x0000056A, 0x000003AD, 0x000003AD, 0x0000056E, 0x00000576, 0x000003AD, 
        0x0000057A, 0x00000581, 0x000003AD, 0x00000589, 0x00000591, 0x00000598, 0x00000521, 0x000003AD, 0x000003AD, 0x000005A0, 0x000005A8, 0x000005B0, 
        0x000005B8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005C0, 0x000003AD, 
        0x000005C8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005D0, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000005D8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005E0, 0x000004E1, 0x000004E1, 0x000004E1, 0x000003AD, 0x000005E6, 0x000005EE, 0x000005C8, 
        0x000005F6, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005FD, 0x000004D2, 0x000003AD, 0x000003AD, 0x000003AD, 0x00000605, 0x0000060D, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x0000060F, 0x00000B09, 0x00000617, 0x000003AD, 0x0000061E, 0x00000626, 0x000003AD, 0x0000062E, 0x00000C2C, 0x000003AD, 
        0x00000511, 0x00000636, 0x00000522, 0x0000063E, 0x00000424, 0x00000646, 0x000003AD, 0x0000064D, 0x000003AD, 0x00000652, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x00000658, 0x00000660, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003FB, 0x000003FB, 
        0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x00000667, 0x0000066F, 0x00000673, 0x0000067B, 0x00000AB9, 0x00000B01, 0x00000683, 0x0000068B, 0x00000AC1, 0x00000AC9, 0x0000059B, 
        0x00000693, 0x0000069B, 0x000006A3, 0x000003AD, 0x000006AB, 0x00000B09, 0x00000B09, 0x00000B09, 0x00000AA9, 0x00000B09, 0x00000B09, 0x00000B09, 
        0x00000B09, 0x00000B09, 0x00000B09, 0x00000B09, 0x00000B0F, 0x000006B1, 0x000003AD, 0x000006B7, 0x000006BE, 0x00000B09, 0x00000B09, 0x00000B09, 

Review comment (suggestion):
As discussed in the comments, please revert the changes in all `*.trie.cs` files. Or Use collection expressions (`[ ]`) since they are now available, they will be more obvious than `=> new`.

Code after:
//---------------------------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by UnicodeDataGenerator.
//     Changes to this file may cause incorrect behavior and will be lost if the code is regenerated.
// </auto-generated>"
//---------------------------------------------------------------------------------------------------

using System;
using System.Runtime.CompilerServices;

namespace Avalonia.Media.TextFormatting.Unicode;

internal static class BidiTrie
{
    public static UnicodeTrie Trie
    {
        [MethodImpl(MethodImplOptions.AggressiveInlining)]
        get => new(Data, 0x00100000, 0x00000000);
    }
    
    // For Debug builds, we store the data in a separate uint[] field to avoid RuntimeFieldInfoStub allocations.
    // See also: https://github.com/AvaloniaUI/Avalonia/pull/20175

#if DEBUG
    public static ReadOnlySpan<uint> Data => s_data;
    private static uint[] s_data =
#else
    public static ReadOnlySpan<uint> Data =>
#endif
    [
        0x0000038D, 0x00000395, 0x0000039D, 0x000003A5, 0x000003BD, 0x000003C5, 0x000003CD, 0x000003D5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 
        0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003DB, 0x000003E3, 0x000003EB, 0x000003F3, 
        0x000003FB, 0x00000403, 0x000003FF, 0x00000407, 0x0000040F, 0x00000417, 0x00000412, 0x0000041A, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 
        0x00000422, 0x0000042A, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x000003AD, 0x000003B5, 0x00000430, 0x00000438, 0x00000440, 0x00000448, 
        0x00000450, 0x00000458, 0x0000045E, 0x00000466, 0x0000046B, 0x00000473, 0x00000476, 0x0000047E, 0x00000485, 0x0000048D, 0x00000493, 0x0000049B, 
        0x0000049A, 0x000004A2, 0x000004AA, 0x000004B2, 0x00000972, 0x00000979, 0x00000981, 0x00000C54, 0x00000AE1, 0x00000457, 0x00000C27, 0x00000AE9, 
        0x000004BA, 0x000004BC, 0x000004C4, 0x000004CC, 0x000004D4, 0x000004D5, 0x000004DD, 0x000004E5, 0x000004ED, 0x000004D5, 0x000004F5, 0x000004FA, 
        0x000004ED, 0x000004D5, 0x00000502, 0x0000050A, 0x000004D4, 0x00000512, 0x0000051A, 0x000004CC, 0x00000522, 0x000003AD, 0x0000052A, 0x0000052E, 
        0x00000536, 0x00000538, 0x00000540, 0x00000548, 0x000004D4, 0x000004D5, 0x00000550, 0x000004CC, 0x00000424, 0x00000554, 0x000004DD, 0x000004CC, 
        0x000004D4, 0x000003AD, 0x0000055C, 0x000003AD, 0x000003AD, 0x00000562, 0x0000056A, 0x000003AD, 0x000003AD, 0x0000056E, 0x00000576, 0x000003AD, 
        0x0000057A, 0x00000581, 0x000003AD, 0x00000589, 0x00000591, 0x00000598, 0x00000521, 0x000003AD, 0x000003AD, 0x000005A0, 0x000005A8, 0x000005B0, 
        0x000005B8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005C0, 0x000003AD, 
        0x000005C8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005D0, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 0x000003AD, 
        0x000005D8, 0x000003AD, 0x000003AD, 0x000003AD, 0x000005E0, 0x000004E1, 0x000004E1, 0x000004E1, 0x000003AD, 0x000005E6, 0x000005EE, 0x000005C8,