.Net: Added shared classes (#58)

* Added Throw shared class

* Added Experimental attribute

* Added IsExternalInit

* Added TrimAttributes

* Small update

* Small update

* Suppress warning

* Added comment

* Updated LegacySupport.props

* Small updates
This commit is contained in:
Dmytro Struk
2025-06-04 08:44:12 +00:00
committed by GitHub
parent 0bcb11fbb4
commit 41facf3a2d
24 changed files with 1680 additions and 0 deletions
@@ -0,0 +1,9 @@
// Copyright (c) Microsoft. All rights reserved.
/* This enables support for C# 9/10 records on older frameworks */
namespace System.Runtime.CompilerServices;
internal static class IsExternalInit
{
}
@@ -0,0 +1,11 @@
# IsExternalInit
Enables use of C# record types on older frameworks.
To use this source in your project, add the following to your `.csproj` file:
```xml
<PropertyGroup>
<InjectIsExternalInitOnLegacy>true</InjectIsExternalInitOnLegacy>
</PropertyGroup>
```