[release/6.0] Support JsonConverterFactory with src-gen (#58652)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 7 Sep 2021 18:18:08 +0000 (11:18 -0700)
committerGitHub <noreply@github.com>
Tue, 7 Sep 2021 18:18:08 +0000 (11:18 -0700)
commit3b6f9c6f4ec621cf2e7e5c5ddf80f20187b30fb4
treeb4c56db072a0291ab1b63c01a2e2965b4fd16cc0
parent8482854c4906a25d0a007fcf2f5deac61cb40b31
[release/6.0] Support JsonConverterFactory with src-gen (#58652)

* Support JsonConverterFactory with src-gen

* Support property factory converters

* Fixup merge ordering; add tests

* Ensure context helper methods properly generated for implicit context types

Co-authored-by: Steve Harter <steveharter@users.noreply.github.com>
13 files changed:
src/libraries/System.Text.Json/gen/JsonSourceGenerator.Emitter.cs
src/libraries/System.Text.Json/gen/JsonSourceGenerator.Parser.cs
src/libraries/System.Text.Json/gen/PropertyGenerationSpec.cs
src/libraries/System.Text.Json/gen/TypeGenerationSpec.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/ContextClasses.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/MetadataAndSerializationContextTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/MetadataContextTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/MixedModeContextTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/RealWorldContextTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/SerializationContextTests.cs
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/System.Text.Json.SourceGeneration.Tests.csproj
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/TestClasses.CustomConverters.cs [new file with mode: 0644]
src/libraries/System.Text.Json/tests/System.Text.Json.SourceGeneration.Tests/TestClasses.cs