Add DictionaryKeyPolicy support for EnumConverter [#47765] (#54429)
authorSychev Vadim <svddroid@gmail.com>
Tue, 3 Aug 2021 03:30:14 +0000 (06:30 +0300)
committerGitHub <noreply@github.com>
Tue, 3 Aug 2021 03:30:14 +0000 (20:30 -0700)
commit814fb1be3423c95861bc414a1d6aabd0a52a3873
tree722b326d5a4229cf141904eb6d087d3931a6e331
parent70eec277f4c27b4e8d3cd4219d368e6fcd2cd835
Add DictionaryKeyPolicy support for EnumConverter [#47765] (#54429)

* Add DictionaryKeyPolicy support for EnumConverter [#47765]

* Moved DictionaryKeyPolicy parsing code to WriteWithQuotes [#47765]

* Refactored the bugfix in accordance to the comments (#47765)

* Made few minor corrections (#47765)
src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Converters/Value/EnumConverter.cs
src/libraries/System.Text.Json/tests/Common/CollectionTests/CollectionTests.Dictionary.KeyPolicy.cs