Skip to content

add DataContractSerializerResolver to simulate DataContractSerializer… - #350

Closed
fredliex wants to merge 1 commit into
MessagePack-CSharp:masterfrom
fredliex:master
Closed

fredliex wants to merge 1 commit into
MessagePack-CSharp:masterfrom
fredliex:master

Conversation

@fredliex

@fredliex fredliex commented Dec 1, 2018

Copy link
Copy Markdown
Contributor

for issue #292

add DataContractSerializerResolver to simulate DataContractSerializer behavior for DataContractAttribute.
detail implement in MessagePack.Internal.ObjectSerializationInfo's CreateOrNull.
I add a argument "bool simulateDataContractSerializer",

  • if allowPrivateoriginal behavior, include private member. when without DataMemberAttribute then throw exception.
  • if !allowPrivate and !simulateDataContractSerializer, same original behavior, skip private member. then throw exception when without DataMemberAttribute.
  • if !allowPrivate and simulateDataContractSerializer, include all member with DataMemberAttribute.

@AArnott

AArnott commented Oct 22, 2019

Copy link
Copy Markdown
Collaborator

Closing because we've fixed emulation of DataContractSerializer elsewhere already.

@AArnott AArnott closed this Oct 22, 2019
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.

2 participants