dotnet / winforms

Windows Forms is a .NET UI framework for building Windows desktop applications.
MIT License
4.29k stars 957 forks source link

Add params to ReadOnlySpan parameters #11416

Closed JeremyKuhne closed 1 month ago

JeremyKuhne commented 1 month ago

This adds params to ReadOnlySpan APIs primarily in System.Drawing. This enables C# to generate stack based collections in some cases.

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-13#params-collections

This feature requires 17.10 of Visual Studio.

cc: @jaredpar

Microsoft Reviewers: Open in CodeFlow
elachlan commented 1 month ago

@JeremyKuhne The tests are failing.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 79.71014% with 14 lines in your changes are missing coverage. Please review.

Project coverage is 74.36928%. Comparing base (ff5ff75) to head (1fc9968). Report is 31 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #11416 +/- ## =================================================== + Coverage 74.27931% 74.36928% +0.08997% =================================================== Files 3026 3028 +2 Lines 626966 627536 +570 Branches 46753 46764 +11 =================================================== + Hits 465706 466694 +988 + Misses 157915 157501 -414 + Partials 3345 3341 -4 ``` | [Flag](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | Coverage Δ | | |---|---|---| | [Debug](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `74.36928% <79.71014%> (+0.08997%)` | :arrow_up: | | [integration](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `17.99496% <0.00000%> (-0.00132%)` | :arrow_down: | | [production](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `47.17464% <77.04918%> (+0.16135%)` | :arrow_up: | | [test](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `96.98686% <100.00000%> (-0.00092%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/dotnet/winforms/pull/11416/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `44.12625% <77.04918%> (+0.13584%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet#carryforward-flags-in-the-pull-request-comment) to find out more.