dotnet / winforms

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

Adding new TryGet methods to Clipboard, DataObject and IDataObject. #11545

Open Tanya-Solyanik opened 1 week ago

Tanya-Solyanik commented 1 week ago

The existing GetData methods now call the new ones. TryGetData methods will fall back to use BinaryFormatter if a binder is provided. The GetData methods will use a binder that allows BInaryFormater to resolve all types is the application sets EnableUnsafeBinaryFormatterDeserialization AppContext switch to true, by default this switch is false.

Microsoft Reviewers: Open in CodeFlow
codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 82.85421% with 167 lines in your changes missing coverage. Please review.

Project coverage is 74.32165%. Comparing base (5cefc3d) to head (c1e4bcd). Report is 6 commits behind head on feature/clipboard.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## feature/clipboard #11545 +/- ## =========================================================== - Coverage 74.40876% 74.32165% -0.08711% =========================================================== Files 3032 3036 +4 Lines 628254 628880 +626 Branches 46832 46877 +45 =========================================================== - Hits 467476 467394 -82 - Misses 157427 158100 +673 - Partials 3351 3386 +35 ``` | [Flag](https://app.codecov.io/gh/dotnet/winforms/pull/11545/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/11545/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `74.32165% <82.85421%> (-0.08711%)` | :arrow_down: | | [integration](https://app.codecov.io/gh/dotnet/winforms/pull/11545/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `17.57819% <25.99010%> (-0.42413%)` | :arrow_down: | | [production](https://app.codecov.io/gh/dotnet/winforms/pull/11545/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `47.08296% <71.28713%> (-0.17901%)` | :arrow_down: | | [test](https://app.codecov.io/gh/dotnet/winforms/pull/11545/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `96.95331% <91.05263%> (-0.01425%)` | :arrow_down: | | [unit](https://app.codecov.io/gh/dotnet/winforms/pull/11545/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=dotnet) | `44.38211% <70.54455%> (+0.13838%)` | :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.