This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Annotate reflection fallback for S.P.DataContractSerialization (#31533)
This adds [removable feature annotation](dotnet/designs#42) to data contract serialization. If the user specifies that they would like to remove support for this at publish/native compilation time, the linker/compiler is going to replace the annotated method bodies with a throwing method body. The exception message is going to inform the user that the feature has been removed because they opted into the removal. The throwing method body is significantly smaller than the transitive closure of code reachable from the original method body. Contributes to #30597. Turning this feature off in the UWP People app saves 4% of size. This is a size on disk regression that came with the new version of CoreFX and blocks the Windows team in picking up the latest framework. There is a zero size growth goal.
- Loading branch information
1 parent
8ce7ff4
commit d21453e
Showing
10 changed files
with
185 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
...m.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionFeature.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
// See the LICENSE file in the project root for more information. | ||
|
||
namespace System.Runtime.Serialization | ||
{ | ||
class ReflectionBasedSerializationFeature | ||
{ | ||
public const string Name = "System.Runtime.Serialization.ReflectionBasedSerialization"; | ||
} | ||
} |
Oops, something went wrong.