-
Notifications
You must be signed in to change notification settings - Fork 345
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
Docs: Actor serialization documentation #1199
Conversation
Signed-off-by: Whit Waldo <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1199 +/- ##
=======================================
Coverage 66.53% 66.53%
=======================================
Files 171 171
Lines 5752 5752
Branches 626 626
=======================================
Hits 3827 3827
Misses 1776 1776
Partials 149 149
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
daprdocs/content/en/dotnet-sdk-docs/dotnet-actors/dotnet-actors-serialization.md
Outdated
Show resolved
Hide resolved
Signed-off-by: Whit Waldo <[email protected])
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.
Overall a fantastic summary of DataContract
based serialization. The only thought I had was whether to further emphasize the official .NET docs at the beginning as "the final word" in serialization, as much of this is not Dapr-specific and subject to change with the .NET Framework rather than Dapr.
…ization development Signed-off-by: Whit Waldo <[email protected]>
I think that's an excellent addition. I've called that out separately and linked to the implementation in the .NET Github repo. |
@WhitWaldo - Thanks for your contribution! Can you sign-off on your commit so DCO will pass? |
Description
This is my first draft of a new page in the documentation detailing how serialization works using the Dapr .NET Actors SDK today. It's my response to the issue raised here which is marked as a bug, but reflects a misunderstanding of how the serialization engine handles records. My goal with adding this page is to provide an upfront resource for developers using actors to understand why serialization may not be working as expected out of the box and provide not only a solution, but an explanation.
I detail how serialization is performed to illustrate the benefits to either going the parameterless constructor route or decorating types and members with the applicable attributes and then share my recommendation to use attributes and why. I dive through several examples documenting expectations in classes, structs and records and then speak a bit to other related scenarios (collections, enums, polymorphic types) towards the end pointing back to the official documentation to keep this document from getting too verbose.
This is a documentation update only and changes no code in the SDK.
Issue reference
We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.
Please reference the issue this PR will close: #679
Checklist
Please make sure you've completed the relevant tasks for this PR, out of the following list:
* [ ] Code compiles correctly* [ ] Created/updated tests