Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respond to feedback for deserialization constructors #21051

Merged
merged 2 commits into from
Oct 13, 2020

Conversation

gewarren
Copy link
Contributor

Related to #21025 .

@gewarren gewarren requested a review from a team as a code owner October 12, 2020 23:49
@dotnet-bot dotnet-bot added this to the October 2020 milestone Oct 12, 2020
@@ -4,9 +4,9 @@ For consistency across all supported target framework monikers (TFMs), non-publi

#### Change description

On .NET Core 3.0 and 3.1, internal and private constructors can be used for deserialization. On .NET Standard 2.0 and 2.1, internal and private constructors are not allowed, and a <xref:System.MissingMethodException> is thrown if no public, parameterless constructor is defined.
The standalone [System.Text.Json NuGet packages](https://www.nuget.org/packages/System.Text.Json/) that support .NET Standard 2.0 and higher, that is, versions 4.6.0-4.7.2, behave inconsistently with the built-in behavior on .NET Core 3.0 and 3.1. On .NET Core 3.x, internal and private constructors can be used for deserialization. In the standalone packages, internal and private constructors are not allowed, and a <xref:System.MissingMethodException> is thrown if no public, parameterless constructor is defined.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

internal and private constructors

I'd say non-public constructors since protected ctors were also allowed.

…ss-constructors-not-used-for-deserialization.md
@gewarren gewarren merged commit 102fa01 into dotnet:master Oct 13, 2020
@gewarren gewarren deleted the constructors-2 branch October 13, 2020 14:09
BillWagner added a commit that referenced this pull request Oct 14, 2020
* Respond to feedback for deserialization constructors (#21051)

* Fixes #20949. (#21052)

* Add f1-keyword for `class` used as generic type constraint (#21037)

* Add f1-keyword for `class` used as generic type constraint

* Add structconstraint

* Update CS0267 message and simplify example (#21047)

* Update CS0267 message and simplify example

* Update ms.date

* Added a link (#21058)

* Fixes #20958. (#21054)

* fix the source path for retired C# 7.x content (#21059)

The "whats-new" folder was missing.

* Removing redundant pipe character (#20931)

* Update single-file.md (#20925)

update ReadyToRun link now that we have the docs for it.

* Remove statement about TLS 1.3 for .NET Core 3.0 (#20922)

I think, TLS 1.3 won't be supported by .NET Core 3.0 since it's out of support and the implementation is coming with .NET 5, as stated in [Transport Layer Security (TLS) best practices with the .NET Framework](#4675 (comment)).

This info should be removed, so we have no misleading information out there... 😉

* SslStream/NegotiateStream breaking change (#20979)

* Add workload and app model to glossary (#21046)

Co-authored-by: Genevieve Warren <[email protected]>

* Breaking change for key-value pair serialization (#21050)

* Update .NET Standard overview for .NET 5 (#20955)

Co-authored-by: Genevieve Warren <[email protected]>

* Update get-started-vscode.md (#21072)

http to https after verifying link

Co-authored-by: Genevieve Warren <[email protected]>
Co-authored-by: Jon Senchyna <[email protected]>
Co-authored-by: Youssef Victor <[email protected]>
Co-authored-by: David Pine <[email protected]>
Co-authored-by: Bill Wagner <[email protected]>
Co-authored-by: William Whitwell Bailey <[email protected]>
Co-authored-by: Lakshan Fernando <[email protected]>
Co-authored-by: kapsiR <[email protected]>
Co-authored-by: Tom Dykstra <[email protected]>
Co-authored-by: icyfire0573 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants