using System.Collections.Immutable; using System.Runtime.CompilerServices; #if !SUPPORTS_IMMUTABLE_COLLECTIONS_MARSHAL namespace System.Runtime.InteropServices; internal static class ImmutableCollectionsMarshal { public static ImmutableArray AsImmutableArray(T[] array) => Unsafe.As>(ref array); } #endif