Skip to content

Collections#14

Merged
lukaskabrt merged 3 commits intomasterfrom
feature/collections-2
Dec 30, 2025
Merged

Collections#14
lukaskabrt merged 3 commits intomasterfrom
feature/collections-2

Conversation

@lukaskabrt
Copy link
Owner

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds List overloads for all scalar collection reading methods in the PbfBlockReader, providing an alternative to the existing buffer-based API. The changes include capacity optimization for List allocations, return type refinements from Span to ReadOnlySpan, and minor code style improvements.

  • Added List overload methods for all collection reading operations (uint, ulong, int, long, signed variants, bool, float, double)
  • Changed return types from Span to ReadOnlySpan for existing buffer-based collection reading methods
  • Simplified lambda parameter syntax in delegate declarations

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 12 comments.

Show a summary per file
File Description
src/PbfLite/PbfLite.csproj Version bumped from 0.1.0 to 0.2.1 to reflect new API additions
src/PbfLite/PbfBlockReader.Collections.cs Added List overloads for all collection reading methods with capacity estimation, changed return types to ReadOnlySpan, simplified lambda syntax
src/PbfLite.Tests/PbfBlockReaderTests.Collections.cs Made test class abstract, renamed test methods to remove "IntoBuffer" suffix, added unused delegate, whitespace cleanup
src/PbfLite.Tests/CollectionsRoundTripTests.cs Whitespace formatting cleanup only
src/PbfLite.Benchmark/PbfBlockReaderCollectionsBenchmarks.cs Added MemoryDiagnoser attribute, added explicit AsSpan() calls, added benchmark for List approach

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 5 changed files in this pull request and generated 9 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@lukaskabrt lukaskabrt merged commit 7e66d1b into master Dec 30, 2025
1 check passed
@lukaskabrt lukaskabrt deleted the feature/collections-2 branch December 30, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants