Add methods for easier serialization of nested classes in the LengthPrefixedBlock#16
Add methods for easier serialization of nested classes in the LengthPrefixedBlock#16lukaskabrt merged 5 commits intomasterfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This pull request adds new API methods to simplify serialization of nested classes in Protocol Buffers by introducing a structured approach to writing length-prefixed blocks. The version is bumped from 0.3.0 to 0.4.0, indicating a minor release with new features.
Changes:
- Added three new public methods:
WriteRaw,StartLengthPrefixedBlock, andFinalizeLengthPrefixedBlockto support manual length-prefixed block serialization - Introduced a
LengthPrefixedBlockstruct to track block positions during serialization - Refactored
WriteScalarCollectionto use the new length-prefixed block methods
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| src/PbfLite/PbfLite.csproj | Version bump from 0.3.0 to 0.4.0 for the minor release |
| src/PbfLite/PbfBlockWriter.cs | Added WriteRaw, StartLengthPrefixedBlock, FinalizeLengthPrefixedBlock methods and LengthPrefixedBlock struct |
| src/PbfLite/PbfBlockWriter.Collections.cs | Refactored WriteScalarCollection to use new length-prefixed block methods |
| src/PbfLite.Tests/PbfBlockWriterTests.cs | Added test for length-prefixed block functionality with various estimated lengths |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@lukaskabrt I've opened a new pull request, #17, to work on those changes. Once the pull request is ready, I'll request review from you. |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@lukaskabrt I've opened a new pull request, #18, to work on those changes. Once the pull request is ready, I'll request review from you. |
* Initial plan * Make LengthPrefixedBlock fields readonly using primary constructor Co-authored-by: lukaskabrt <2894161+lukaskabrt@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lukaskabrt <2894161+lukaskabrt@users.noreply.github.com>
* Initial plan * Add dedicated tests for WriteRaw method Co-authored-by: lukaskabrt <2894161+lukaskabrt@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: lukaskabrt <2894161+lukaskabrt@users.noreply.github.com>
No description provided.