diff --git a/apiCount.include.md b/apiCount.include.md index 13935dfb..9ca1f8c6 100644 --- a/apiCount.include.md +++ b/apiCount.include.md @@ -1,28 +1,28 @@ -**API count: 959** +**API count: 961** ### Per Target Framework | Target | APIs | | -- | -- | -| `net461` | 934 | -| `net462` | 934 | -| `net47` | 933 | -| `net471` | 932 | -| `net472` | 928 | -| `net48` | 928 | -| `net481` | 928 | -| `netstandard2.0` | 930 | -| `netstandard2.1` | 761 | -| `netcoreapp2.0` | 854 | -| `netcoreapp2.1` | 773 | -| `netcoreapp2.2` | 773 | -| `netcoreapp3.0` | 719 | -| `netcoreapp3.1` | 718 | -| `net5.0` | 590 | -| `net6.0` | 495 | -| `net7.0` | 342 | -| `net8.0` | 223 | -| `net9.0` | 147 | -| `net10.0` | 95 | -| `net11.0` | 58 | -| `uap10.0` | 920 | +| `net461` | 936 | +| `net462` | 936 | +| `net47` | 935 | +| `net471` | 934 | +| `net472` | 930 | +| `net48` | 930 | +| `net481` | 930 | +| `netstandard2.0` | 932 | +| `netstandard2.1` | 763 | +| `netcoreapp2.0` | 856 | +| `netcoreapp2.1` | 775 | +| `netcoreapp2.2` | 775 | +| `netcoreapp3.0` | 721 | +| `netcoreapp3.1` | 720 | +| `net5.0` | 592 | +| `net6.0` | 497 | +| `net7.0` | 344 | +| `net8.0` | 225 | +| `net9.0` | 149 | +| `net10.0` | 96 | +| `net11.0` | 59 | +| `uap10.0` | 922 | diff --git a/assemblySize.include.md b/assemblySize.include.md index 31d0edeb..b292bf89 100644 --- a/assemblySize.include.md +++ b/assemblySize.include.md @@ -2,25 +2,25 @@ | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 326.5KB | +318.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netstandard2.1 | 8.5KB | 280.0KB | +271.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net461 | 8.5KB | 325.5KB | +317.0KB | +8.5KB | +6.5KB | +9.0KB | +14.0KB | -| net462 | 7.0KB | 329.0KB | +322.0KB | +8.5KB | +6.5KB | +9.0KB | +14.0KB | -| net47 | 7.0KB | 328.5KB | +321.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net471 | 8.5KB | 328.0KB | +319.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net472 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net48 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net481 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| netstandard2.0 | 8.0KB | 327.0KB | +319.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| netstandard2.1 | 8.5KB | 280.0KB | +271.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net461 | 8.5KB | 325.5KB | +317.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net462 | 7.0KB | 329.0KB | +322.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net47 | 7.0KB | 329.0KB | +322.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net471 | 8.5KB | 328.0KB | +319.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net472 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| net48 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| net481 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | | netcoreapp2.0 | 9.0KB | 303.0KB | +294.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp2.1 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.0KB | +14.0KB | -| netcoreapp2.2 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.0KB | +14.0KB | -| netcoreapp3.0 | 9.5KB | 274.0KB | +264.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | -| netcoreapp3.1 | 9.5KB | 272.5KB | +263.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net5.0 | 9.5KB | 236.0KB | +226.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net6.0 | 10.0KB | 177.0KB | +167.0KB | +10.0KB | +7.0KB | +512bytes | +4.0KB | -| net7.0 | 10.0KB | 139.5KB | +129.5KB | +9.0KB | +5.5KB | +512bytes | +3.5KB | -| net8.0 | 9.5KB | 111.0KB | +101.5KB | +8.0KB | | +512bytes | +3.0KB | -| net9.0 | 9.5KB | 67.0KB | +57.5KB | +9.0KB | | +512bytes | +3.5KB | +| netcoreapp2.1 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB | +| netcoreapp2.2 | 9.0KB | 283.0KB | +274.0KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.0 | 9.5KB | 274.5KB | +265.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.1 | 9.5KB | 272.5KB | +263.0KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net5.0 | 9.5KB | 236.0KB | +226.5KB | +9.5KB | +6.5KB | +9.5KB | +14.5KB | +| net6.0 | 10.0KB | 177.0KB | +167.0KB | +10.0KB | +7.5KB | +1.0KB | +4.0KB | +| net7.0 | 10.0KB | 139.5KB | +129.5KB | +9.5KB | +5.5KB | +512bytes | +4.0KB | +| net8.0 | 9.5KB | 111.0KB | +101.5KB | +8.5KB | +512bytes | +512bytes | +3.5KB | +| net9.0 | 9.5KB | 67.5KB | +58.0KB | +8.5KB | | +512bytes | +3.5KB | | net10.0 | 10.0KB | 43.5KB | +33.5KB | +9.0KB | | +512bytes | +3.5KB | | net11.0 | 10.0KB | 20.5KB | +10.5KB | +9.0KB | | +512bytes | +3.5KB | @@ -29,24 +29,24 @@ | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 474.9KB | +466.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netstandard2.1 | 8.5KB | 403.2KB | +394.7KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net461 | 8.5KB | 474.9KB | +466.4KB | +16.2KB | +8.2KB | +13.9KB | +19.4KB | -| net462 | 7.0KB | 478.4KB | +471.4KB | +16.2KB | +8.2KB | +13.9KB | +19.4KB | -| net47 | 7.0KB | 477.7KB | +470.7KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net471 | 8.5KB | 476.8KB | +468.3KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net472 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net48 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net481 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.0 | 9.0KB | 441.6KB | +432.6KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.1 | 9.0KB | 409.9KB | +400.9KB | +16.7KB | +8.7KB | +13.9KB | +19.4KB | -| netcoreapp2.2 | 9.0KB | 409.9KB | +400.9KB | +16.7KB | +8.7KB | +13.9KB | +19.4KB | -| netcoreapp3.0 | 9.5KB | 392.1KB | +382.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | -| netcoreapp3.1 | 9.5KB | 390.6KB | +381.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net5.0 | 9.5KB | 335.9KB | +326.4KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net6.0 | 10.0KB | 256.9KB | +246.9KB | +17.7KB | +8.7KB | +1.1KB | +4.7KB | -| net7.0 | 10.0KB | 200.8KB | +190.8KB | +16.6KB | +6.9KB | +1.1KB | +4.2KB | -| net8.0 | 9.5KB | 157.1KB | +147.6KB | +15.5KB | +299bytes | +1.1KB | +3.7KB | -| net9.0 | 9.5KB | 92.7KB | +83.2KB | +16.5KB | | +1.1KB | +4.2KB | -| net10.0 | 10.0KB | 60.7KB | +50.7KB | +16.5KB | | +1.1KB | +4.2KB | -| net11.0 | 10.0KB | 30.3KB | +20.3KB | +16.5KB | | +1.1KB | +4.2KB | +| netstandard2.0 | 8.0KB | 476.3KB | +468.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| netstandard2.1 | 8.5KB | 404.1KB | +395.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net461 | 8.5KB | 475.8KB | +467.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net462 | 7.0KB | 479.3KB | +472.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net47 | 7.0KB | 479.1KB | +472.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net471 | 8.5KB | 477.7KB | +469.2KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net472 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| net48 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| net481 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.0 | 9.0KB | 442.5KB | +433.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| netcoreapp2.1 | 9.0KB | 410.8KB | +401.8KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB | +| netcoreapp2.2 | 9.0KB | 411.3KB | +402.3KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.0 | 9.5KB | 393.5KB | +384.0KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.1 | 9.5KB | 391.5KB | +382.0KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net5.0 | 9.5KB | 336.8KB | +327.3KB | +17.2KB | +8.2KB | +14.4KB | +19.9KB | +| net6.0 | 10.0KB | 257.8KB | +247.8KB | +17.7KB | +9.2KB | +1.6KB | +4.7KB | +| net7.0 | 10.0KB | 201.8KB | +191.8KB | +17.1KB | +6.9KB | +1.1KB | +4.7KB | +| net8.0 | 9.5KB | 158.0KB | +148.5KB | +16.0KB | +811bytes | +1.1KB | +4.2KB | +| net9.0 | 9.5KB | 94.1KB | +84.6KB | +16.0KB | | +1.1KB | +4.2KB | +| net10.0 | 10.0KB | 61.2KB | +51.2KB | +16.5KB | | +1.1KB | +4.2KB | +| net11.0 | 10.0KB | 30.8KB | +20.8KB | +16.5KB | | +1.1KB | +4.2KB | diff --git a/readme.md b/readme.md index 3fa669b1..75ab58b9 100644 --- a/readme.md +++ b/readme.md @@ -13,34 +13,34 @@ The package targets `netstandard2.0` and is designed to support the following ru * `uap10` -**API count: 959** +**API count: 961** ### Per Target Framework | Target | APIs | | -- | -- | -| `net461` | 934 | -| `net462` | 934 | -| `net47` | 933 | -| `net471` | 932 | -| `net472` | 928 | -| `net48` | 928 | -| `net481` | 928 | -| `netstandard2.0` | 930 | -| `netstandard2.1` | 761 | -| `netcoreapp2.0` | 854 | -| `netcoreapp2.1` | 773 | -| `netcoreapp2.2` | 773 | -| `netcoreapp3.0` | 719 | -| `netcoreapp3.1` | 718 | -| `net5.0` | 590 | -| `net6.0` | 495 | -| `net7.0` | 342 | -| `net8.0` | 223 | -| `net9.0` | 147 | -| `net10.0` | 95 | -| `net11.0` | 58 | -| `uap10.0` | 920 | +| `net461` | 936 | +| `net462` | 936 | +| `net47` | 935 | +| `net471` | 934 | +| `net472` | 930 | +| `net48` | 930 | +| `net481` | 930 | +| `netstandard2.0` | 932 | +| `netstandard2.1` | 763 | +| `netcoreapp2.0` | 856 | +| `netcoreapp2.1` | 775 | +| `netcoreapp2.2` | 775 | +| `netcoreapp3.0` | 721 | +| `netcoreapp3.1` | 720 | +| `net5.0` | 592 | +| `net6.0` | 497 | +| `net7.0` | 344 | +| `net8.0` | 225 | +| `net9.0` | 149 | +| `net10.0` | 96 | +| `net11.0` | 59 | +| `uap10.0` | 922 | @@ -96,25 +96,25 @@ This project uses features from the current stable SDK and C# language. As such | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 326.5KB | +318.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netstandard2.1 | 8.5KB | 280.0KB | +271.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net461 | 8.5KB | 325.5KB | +317.0KB | +8.5KB | +6.5KB | +9.0KB | +14.0KB | -| net462 | 7.0KB | 329.0KB | +322.0KB | +8.5KB | +6.5KB | +9.0KB | +14.0KB | -| net47 | 7.0KB | 328.5KB | +321.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net471 | 8.5KB | 328.0KB | +319.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | -| net472 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net48 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net481 | 8.5KB | 326.5KB | +318.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| netstandard2.0 | 8.0KB | 327.0KB | +319.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| netstandard2.1 | 8.5KB | 280.0KB | +271.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net461 | 8.5KB | 325.5KB | +317.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net462 | 7.0KB | 329.0KB | +322.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net47 | 7.0KB | 329.0KB | +322.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net471 | 8.5KB | 328.0KB | +319.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | +| net472 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| net48 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| net481 | 8.5KB | 327.0KB | +318.5KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | | netcoreapp2.0 | 9.0KB | 303.0KB | +294.0KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| netcoreapp2.1 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.0KB | +14.0KB | -| netcoreapp2.2 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.0KB | +14.0KB | -| netcoreapp3.0 | 9.5KB | 274.0KB | +264.5KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | -| netcoreapp3.1 | 9.5KB | 272.5KB | +263.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | -| net5.0 | 9.5KB | 236.0KB | +226.5KB | +9.0KB | +6.5KB | +9.0KB | +14.0KB | -| net6.0 | 10.0KB | 177.0KB | +167.0KB | +10.0KB | +7.0KB | +512bytes | +4.0KB | -| net7.0 | 10.0KB | 139.5KB | +129.5KB | +9.0KB | +5.5KB | +512bytes | +3.5KB | -| net8.0 | 9.5KB | 111.0KB | +101.5KB | +8.0KB | | +512bytes | +3.0KB | -| net9.0 | 9.5KB | 67.0KB | +57.5KB | +9.0KB | | +512bytes | +3.5KB | +| netcoreapp2.1 | 9.0KB | 282.5KB | +273.5KB | +9.0KB | +7.0KB | +9.5KB | +14.0KB | +| netcoreapp2.2 | 9.0KB | 283.0KB | +274.0KB | +8.5KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.0 | 9.5KB | 274.5KB | +265.0KB | +9.0KB | +6.5KB | +9.0KB | +13.5KB | +| netcoreapp3.1 | 9.5KB | 272.5KB | +263.0KB | +9.0KB | +6.5KB | +9.5KB | +14.0KB | +| net5.0 | 9.5KB | 236.0KB | +226.5KB | +9.5KB | +6.5KB | +9.5KB | +14.5KB | +| net6.0 | 10.0KB | 177.0KB | +167.0KB | +10.0KB | +7.5KB | +1.0KB | +4.0KB | +| net7.0 | 10.0KB | 139.5KB | +129.5KB | +9.5KB | +5.5KB | +512bytes | +4.0KB | +| net8.0 | 9.5KB | 111.0KB | +101.5KB | +8.5KB | +512bytes | +512bytes | +3.5KB | +| net9.0 | 9.5KB | 67.5KB | +58.0KB | +8.5KB | | +512bytes | +3.5KB | | net10.0 | 10.0KB | 43.5KB | +33.5KB | +9.0KB | | +512bytes | +3.5KB | | net11.0 | 10.0KB | 20.5KB | +10.5KB | +9.0KB | | +512bytes | +3.5KB | @@ -123,27 +123,27 @@ This project uses features from the current stable SDK and C# language. As such | | Empty Assembly | With Polyfill | Diff | Ensure | ArgumentExceptions | StringInterpolation | Nullability | |----------------|----------------|---------------|-----------|-----------|--------------------|---------------------|-------------| -| netstandard2.0 | 8.0KB | 474.9KB | +466.9KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netstandard2.1 | 8.5KB | 403.2KB | +394.7KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net461 | 8.5KB | 474.9KB | +466.4KB | +16.2KB | +8.2KB | +13.9KB | +19.4KB | -| net462 | 7.0KB | 478.4KB | +471.4KB | +16.2KB | +8.2KB | +13.9KB | +19.4KB | -| net47 | 7.0KB | 477.7KB | +470.7KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net471 | 8.5KB | 476.8KB | +468.3KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | -| net472 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net48 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net481 | 8.5KB | 474.3KB | +465.8KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.0 | 9.0KB | 441.6KB | +432.6KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| netcoreapp2.1 | 9.0KB | 409.9KB | +400.9KB | +16.7KB | +8.7KB | +13.9KB | +19.4KB | -| netcoreapp2.2 | 9.0KB | 409.9KB | +400.9KB | +16.7KB | +8.7KB | +13.9KB | +19.4KB | -| netcoreapp3.0 | 9.5KB | 392.1KB | +382.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | -| netcoreapp3.1 | 9.5KB | 390.6KB | +381.1KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | -| net5.0 | 9.5KB | 335.9KB | +326.4KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | -| net6.0 | 10.0KB | 256.9KB | +246.9KB | +17.7KB | +8.7KB | +1.1KB | +4.7KB | -| net7.0 | 10.0KB | 200.8KB | +190.8KB | +16.6KB | +6.9KB | +1.1KB | +4.2KB | -| net8.0 | 9.5KB | 157.1KB | +147.6KB | +15.5KB | +299bytes | +1.1KB | +3.7KB | -| net9.0 | 9.5KB | 92.7KB | +83.2KB | +16.5KB | | +1.1KB | +4.2KB | -| net10.0 | 10.0KB | 60.7KB | +50.7KB | +16.5KB | | +1.1KB | +4.2KB | -| net11.0 | 10.0KB | 30.3KB | +20.3KB | +16.5KB | | +1.1KB | +4.2KB | +| netstandard2.0 | 8.0KB | 476.3KB | +468.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| netstandard2.1 | 8.5KB | 404.1KB | +395.6KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net461 | 8.5KB | 475.8KB | +467.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net462 | 7.0KB | 479.3KB | +472.3KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net47 | 7.0KB | 479.1KB | +472.1KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net471 | 8.5KB | 477.7KB | +469.2KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| net472 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| net48 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| net481 | 8.5KB | 475.7KB | +467.2KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp2.0 | 9.0KB | 442.5KB | +433.5KB | +16.7KB | +8.2KB | +13.9KB | +19.4KB | +| netcoreapp2.1 | 9.0KB | 410.8KB | +401.8KB | +16.7KB | +8.7KB | +14.4KB | +19.4KB | +| netcoreapp2.2 | 9.0KB | 411.3KB | +402.3KB | +16.2KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.0 | 9.5KB | 393.5KB | +384.0KB | +16.7KB | +8.2KB | +13.9KB | +18.9KB | +| netcoreapp3.1 | 9.5KB | 391.5KB | +382.0KB | +16.7KB | +8.2KB | +14.4KB | +19.4KB | +| net5.0 | 9.5KB | 336.8KB | +327.3KB | +17.2KB | +8.2KB | +14.4KB | +19.9KB | +| net6.0 | 10.0KB | 257.8KB | +247.8KB | +17.7KB | +9.2KB | +1.6KB | +4.7KB | +| net7.0 | 10.0KB | 201.8KB | +191.8KB | +17.1KB | +6.9KB | +1.1KB | +4.7KB | +| net8.0 | 9.5KB | 158.0KB | +148.5KB | +16.0KB | +811bytes | +1.1KB | +4.2KB | +| net9.0 | 9.5KB | 94.1KB | +84.6KB | +16.0KB | | +1.1KB | +4.2KB | +| net10.0 | 10.0KB | 61.2KB | +51.2KB | +16.5KB | | +1.1KB | +4.2KB | +| net11.0 | 10.0KB | 30.8KB | +20.8KB | +16.5KB | | +1.1KB | +4.2KB | diff --git a/src/Consume/Consume.cs b/src/Consume/Consume.cs index 356a32f0..317e5706 100644 --- a/src/Consume/Consume.cs +++ b/src/Consume/Consume.cs @@ -106,8 +106,8 @@ class Consume #if FeatureMemory type = typeof(CollectionBuilderAttribute); #endif - //TODO: - //type = typeof(AsyncMethodBuilderAttribute); + type = typeof(AsyncMethodBuilderAttribute); + type = typeof(CompilerLoweringPreserveAttribute); #if !NET6_0 && !NET5_0 type = typeof(ObsoletedOSPlatformAttribute); type = typeof(SupportedOSPlatformGuardAttribute); diff --git a/src/Consume/ForceAmbiguousReference.cs b/src/Consume/ForceAmbiguousReference.cs index 7071ef8c..5a48b5a5 100644 --- a/src/Consume/ForceAmbiguousReference.cs +++ b/src/Consume/ForceAmbiguousReference.cs @@ -30,6 +30,10 @@ public sealed class OverloadResolutionPriorityAttribute; public sealed class ParamCollectionAttribute; +public sealed class AsyncMethodBuilderAttribute; + +public sealed class CompilerLoweringPreserveAttribute; + public sealed class DisableRuntimeMarshallingAttribute; public sealed class AllowNullAttribute; diff --git a/src/Polyfill/AsyncMethodBuilderAttribute.cs b/src/Polyfill/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..338d51b0 --- /dev/null +++ b/src/Polyfill/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,45 @@ +#if !FeatureValueTask && !NETCOREAPP + +namespace System.Runtime.CompilerServices; + +using Diagnostics; +using Diagnostics.CodeAnalysis; + +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.asyncmethodbuilderattribute?view=net-11.0 +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Polyfill/CompilerLoweringPreserveAttribute.cs b/src/Polyfill/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..ca40d347 --- /dev/null +++ b/src/Polyfill/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,26 @@ +#if !NET10_0_OR_GREATER + +namespace System.Runtime.CompilerServices; + +using Diagnostics; +using Diagnostics.CodeAnalysis; + +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +//Link: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.compilerservices.compilerloweringpreserveattribute?view=net-11.0 +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; +#else +[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerLoweringPreserveAttribute))] +#endif diff --git a/src/Split/net10.0/TypeForwardeds.cs b/src/Split/net10.0/TypeForwardeds.cs index dc347bc9..b95ad748 100644 --- a/src/Split/net10.0/TypeForwardeds.cs +++ b/src/Split/net10.0/TypeForwardeds.cs @@ -6,6 +6,7 @@ [assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CollectionBuilderAttribute))] [assembly: TypeForwardedTo(typeof(System.Runtime.InteropServices.CollectionsMarshal))] [assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute))] +[assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerLoweringPreserveAttribute))] [assembly: TypeForwardedTo(typeof(System.Threading.Tasks.ConfigureAwaitOptions))] [assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute))] [assembly: TypeForwardedTo(typeof(System.Diagnostics.DebuggerDisableUserUnhandledExceptionsAttribute))] diff --git a/src/Split/net11.0/TypeForwardeds.cs b/src/Split/net11.0/TypeForwardeds.cs index 296cf844..03ee3eb9 100644 --- a/src/Split/net11.0/TypeForwardeds.cs +++ b/src/Split/net11.0/TypeForwardeds.cs @@ -6,6 +6,7 @@ [assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CollectionBuilderAttribute))] [assembly: TypeForwardedTo(typeof(System.Runtime.InteropServices.CollectionsMarshal))] [assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute))] +[assembly: TypeForwardedTo(typeof(System.Runtime.CompilerServices.CompilerLoweringPreserveAttribute))] [assembly: TypeForwardedTo(typeof(System.Threading.Tasks.ConfigureAwaitOptions))] [assembly: TypeForwardedTo(typeof(System.Diagnostics.CodeAnalysis.ConstantExpectedAttribute))] [assembly: TypeForwardedTo(typeof(System.Diagnostics.DebuggerDisableUserUnhandledExceptionsAttribute))] diff --git a/src/Split/net461/AsyncMethodBuilderAttribute.cs b/src/Split/net461/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net461/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net461/CompilerLoweringPreserveAttribute.cs b/src/Split/net461/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net461/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net462/AsyncMethodBuilderAttribute.cs b/src/Split/net462/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net462/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net462/CompilerLoweringPreserveAttribute.cs b/src/Split/net462/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net462/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net47/AsyncMethodBuilderAttribute.cs b/src/Split/net47/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net47/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net47/CompilerLoweringPreserveAttribute.cs b/src/Split/net47/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net47/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net471/AsyncMethodBuilderAttribute.cs b/src/Split/net471/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net471/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net471/CompilerLoweringPreserveAttribute.cs b/src/Split/net471/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net471/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net472/AsyncMethodBuilderAttribute.cs b/src/Split/net472/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net472/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net472/CompilerLoweringPreserveAttribute.cs b/src/Split/net472/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net472/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net48/AsyncMethodBuilderAttribute.cs b/src/Split/net48/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net48/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net48/CompilerLoweringPreserveAttribute.cs b/src/Split/net48/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net48/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net481/AsyncMethodBuilderAttribute.cs b/src/Split/net481/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/net481/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/net481/CompilerLoweringPreserveAttribute.cs b/src/Split/net481/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net481/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net5.0/CompilerLoweringPreserveAttribute.cs b/src/Split/net5.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net5.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net6.0/CompilerLoweringPreserveAttribute.cs b/src/Split/net6.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net6.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net7.0/CompilerLoweringPreserveAttribute.cs b/src/Split/net7.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net7.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net8.0/CompilerLoweringPreserveAttribute.cs b/src/Split/net8.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net8.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/net9.0/CompilerLoweringPreserveAttribute.cs b/src/Split/net9.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/net9.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netcoreapp2.0/CompilerLoweringPreserveAttribute.cs b/src/Split/netcoreapp2.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netcoreapp2.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netcoreapp2.1/CompilerLoweringPreserveAttribute.cs b/src/Split/netcoreapp2.1/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netcoreapp2.1/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netcoreapp2.2/CompilerLoweringPreserveAttribute.cs b/src/Split/netcoreapp2.2/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netcoreapp2.2/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netcoreapp3.0/CompilerLoweringPreserveAttribute.cs b/src/Split/netcoreapp3.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netcoreapp3.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netcoreapp3.1/CompilerLoweringPreserveAttribute.cs b/src/Split/netcoreapp3.1/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netcoreapp3.1/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netstandard2.0/AsyncMethodBuilderAttribute.cs b/src/Split/netstandard2.0/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/netstandard2.0/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/netstandard2.0/CompilerLoweringPreserveAttribute.cs b/src/Split/netstandard2.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netstandard2.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/netstandard2.1/AsyncMethodBuilderAttribute.cs b/src/Split/netstandard2.1/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/netstandard2.1/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/netstandard2.1/CompilerLoweringPreserveAttribute.cs b/src/Split/netstandard2.1/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/netstandard2.1/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Split/uap10.0/AsyncMethodBuilderAttribute.cs b/src/Split/uap10.0/AsyncMethodBuilderAttribute.cs new file mode 100644 index 00000000..19e126ca --- /dev/null +++ b/src/Split/uap10.0/AsyncMethodBuilderAttribute.cs @@ -0,0 +1,42 @@ +// +#pragma warning disable +#if !FeatureValueTask +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates the type of the async method builder that should be used by a language compiler to +/// build the attributed async method or to build the attributed type when used as the return type +/// of an async method. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage( + AttributeTargets.Class | + AttributeTargets.Struct | + AttributeTargets.Interface | + AttributeTargets.Delegate | + AttributeTargets.Enum | + AttributeTargets.Method, + Inherited = false, + AllowMultiple = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class AsyncMethodBuilderAttribute : + Attribute +{ + /// + /// Initializes a new instance of the class. + /// + public AsyncMethodBuilderAttribute(Type builderType) => + BuilderType = builderType; + /// + /// Gets the of the associated builder. + /// + public Type BuilderType { get; } +} +#endif diff --git a/src/Split/uap10.0/CompilerLoweringPreserveAttribute.cs b/src/Split/uap10.0/CompilerLoweringPreserveAttribute.cs new file mode 100644 index 00000000..d33d626c --- /dev/null +++ b/src/Split/uap10.0/CompilerLoweringPreserveAttribute.cs @@ -0,0 +1,20 @@ +// +#pragma warning disable +namespace System.Runtime.CompilerServices; +using Diagnostics; +using Diagnostics.CodeAnalysis; +/// +/// Indicates to the compiler that applications of an attribute should be preserved +/// through compiler lowering, flowing down to any compiler-generated symbols. +/// +[ExcludeFromCodeCoverage] +[DebuggerNonUserCode] +[AttributeUsage(AttributeTargets.Class, Inherited = false)] +#if PolyUseEmbeddedAttribute +[global::Microsoft.CodeAnalysis.EmbeddedAttribute] +#endif +#if PolyPublic +public +#endif +sealed class CompilerLoweringPreserveAttribute : + Attribute; diff --git a/src/Tests/AsyncMethodBuilderAttributeTests.cs b/src/Tests/AsyncMethodBuilderAttributeTests.cs new file mode 100644 index 00000000..97a985cb --- /dev/null +++ b/src/Tests/AsyncMethodBuilderAttributeTests.cs @@ -0,0 +1,9 @@ +public class AsyncMethodBuilderAttributeTests +{ + [Test] + public async Task Run() + { + var attribute = new AsyncMethodBuilderAttribute(typeof(string)); + await Assert.That(attribute.BuilderType).IsEqualTo(typeof(string)); + } +} diff --git a/src/Tests/CompilerLoweringPreserveAttributeTests.cs b/src/Tests/CompilerLoweringPreserveAttributeTests.cs new file mode 100644 index 00000000..16ad6800 --- /dev/null +++ b/src/Tests/CompilerLoweringPreserveAttributeTests.cs @@ -0,0 +1,14 @@ +using System.Reflection; + +public class CompilerLoweringPreserveAttributeTests +{ + [Test] + public async Task Run() + { + var attribute = typeof(Decorated).GetCustomAttribute(); + await Assert.That(attribute).IsNotNull(); + } + + [CompilerLoweringPreserve] + class Decorated : Attribute; +}