#if NET48
// Polyfills for C# 9+ language features that the helper uses but that net48 BCL doesn't
// provide. Keeps the sources single-target-free at the language level — the same .cs files
// build on both frameworks without preprocessor guards in the callsites.

namespace System.Runtime.CompilerServices
{
    /// <summary>Required by C# 9 <c>init</c>-only setters and <c>record</c> types.</summary>
    internal static class IsExternalInit { }
}

namespace System.Runtime.Versioning
{
    /// <summary>
    ///     Minimal shim for the .NET 5+ <c>SupportedOSPlatformAttribute</c>. Pure marker for the
    ///     compiler on net10; on net48 we still want the attribute to exist so the same
    ///     <c>[SupportedOSPlatform("windows")]</c> source compiles. The attribute is internal
    ///     and attribute-targets-everything to minimize surface.
    /// </summary>
    [AttributeUsage(AttributeTargets.All, Inherited = false, AllowMultiple = true)]
    internal sealed class SupportedOSPlatformAttribute(string platformName) : Attribute
    {
        public string PlatformName { get; } = platformName;
    }
}
#endif
