You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support parameter-less event methods in DataContractSerializer (without a StreamingContext parameter) #109264
When I use event methods for the DataContractSerializer system, I still need a StreamingContext parameter even though the BinaryFormatter stuff is deprecated. The constructor and state property of StreamingContext is marked as obsolete.
The StreamingContext _ parameter is unused in the below code. I feel it is redundant.
Parameter-less one like the code below makes me feel refreshed. Also, we do not need to type unused parameters. So, developing efficiency is more improved. In addition, maybe, passing (copying structure data) the parameter makes a program slow. Or maybe, the speed is the same because of checking parameters.
Activity
dotnet-policy-service commentedon Oct 27, 2024
Tagging subscribers to this area: @dotnet/area-system-text-json, @gregsdennis
See info in area-owners.md if you want to be subscribed.
Takym commentedon Nov 23, 2024
Related codes
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ClassDataContract.cs
Lines 1063 to 1142 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionClassWriter.cs
Lines 130 to 150 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatWriterGenerator.cs
Lines 174 to 198 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatWriterGenerator.cs
Lines 207 to 231 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/ReflectionReader.cs
Lines 398 to 418 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/XmlFormatReaderGenerator.cs
Lines 290 to 322 in f1332ab
runtime/src/libraries/System.Private.DataContractSerialization/src/System/Runtime/Serialization/Json/JsonFormatReaderGenerator.cs
Lines 232 to 258 in f1332ab
dotnet-policy-service commentedon Feb 2, 2025
Tagging subscribers to 'binaryformatter-migration': @adamsitnik, @bartonjs, @jeffhandley, @terrajobst
Resolves dotnet#109264: Implementation to support parameter-less even…