[PR #51] BinaryPropertyListParser/Writer: Add extensibility points #81

Open
opened 2026-01-30 21:27:02 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/claunia/plist-cil/pull/51

State: closed
Merged: Yes


I've spent some time today figuring out why the BinaryPropertyListWriter was generating slightly different data from what I expected.

To figure that out, did some debugging tricks like:

  • Change the EqualityComparers which are passed to the BinaryPropertyListWriter
  • Dumping all IDs as they are being assigned in AssignID
  • Adding some diagnostic code to BinaryPropertyListParser to get the index, offset and summary of all values in the binary property list,
  • ...

In the end, my life would be easier if:

  • I could just inherit from BinaryPropertyListParser and BinaryPropertyListWriter and override methods like DoParse.
  • I could pass a custom EqualityComparer to the BinaryPropertyListWriter when it's being created.

This PR makes some of the methods protected and adds a new constructor, just enough so that I can actually do that.

Hopefully this is OK with you.

**Original Pull Request:** https://github.com/claunia/plist-cil/pull/51 **State:** closed **Merged:** Yes --- I've spent some time today figuring out why the `BinaryPropertyListWriter` was generating slightly different data from what I expected. To figure that out, did some debugging tricks like: - Change the `EqualityComparer`s which are passed to the `BinaryPropertyListWriter` - Dumping all IDs as they are being assigned in `AssignID` - Adding some diagnostic code to `BinaryPropertyListParser` to get the index, offset and summary of all values in the binary property list, - ... In the end, my life would be easier if: - I could just inherit from `BinaryPropertyListParser` and `BinaryPropertyListWriter` and override methods like `DoParse`. - I could pass a custom EqualityComparer to the `BinaryPropertyListWriter` when it's being created. This PR makes some of the methods protected and adds a new constructor, just enough so that I can actually do that. Hopefully this is OK with you.
claunia added the pull-request label 2026-01-30 21:27:02 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: claunia/plist-cil#81