-
Notifications
You must be signed in to change notification settings - Fork 4.9k
DbNull serialization with tests and forward #23897
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,6 +20,7 @@ | |
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.ShortEnumEqualityComparer<>))] | ||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.Generic.LongEnumEqualityComparer<>))] | ||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Collections.ListDictionaryInternal))] | ||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.UnitySerializationHolder))] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @weshaggard are you fine with that change? You can find the type here: https://github.com/dotnet/coreclr/blob/master/src/mscorlib/shared/System/UnitySerializationHolder.cs There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. And any idea why I didn't need a TypeForwardedFrom attribute on the UnitySerializationHolder? Is it because it sets the type itself with SerializationInfo.SetType(Type)? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes I'm fine with this change as it is along the lines as the other ones here. As for the TypeForwardedFrom question I'm not sure I would expect if you serialize on core it would end up with System.Private.CoreLib as the assembly it is from, is that not what is happening? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. That's what's so interesting about it. It doesn't contain the QualifiedAssemblyName, so it's the optimized version without the attribute: �����ÿÿÿÿ��������������System.UnitySerializationHolder�����Data UnityType There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting I don't know why that is. Your the expert here now :) My only guess is that the binary serializer omits assembly names for the core assembly? Not sure though. It is probably worth debugging though the code to understand further. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have a guess but need to verify it. Thanks Wes :) |
||
|
||
// This is temporary as we are building the mscorlib shim against netfx461 which doesn't contain ValueTuples. | ||
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.ValueTuple))] | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I want to move this test to System.Runtime.Tests but I will wait with that until I commited my change into the release/2.0.0 branch because it requires the bigger change #23940 to handle "blobs" outside of S.R.Serialization.Formatters.