winforms
winforms copied to clipboard
Define new scopes for AppContext switches for use in tests
- replace use cases of SetLocalAppContextSwitchValue in tests with custom scope for each switch see BinaryFormatterScope example.
- Replace use cases of TestAccessor like this one - https://github.com/dotnet/winforms/blob/29528171490190df28fd4afc89dee271ebfef68b/src/System.Windows.Forms/tests/IntegrationTests/UIIntegrationTests/Dpi/FormDpiTests.cs#L111 with AppContext switch scopes as well
@Tanya-Solyanik can we resolve this now? I am not sure if the PR covered everything. I thought I got all the usages, but could be wrong.