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

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

📋 Pull Request Information

Original PR: https://github.com/claunia/plist-cil/pull/51
Author: @qmfrederik
Created: 10/16/2018
Status: Merged
Merged: 10/18/2018
Merged by: @claunia

Base: masterHead: features/extensibility


📝 Commits (1)

  • 66f86cf BinaryPropertyListParser/Writer: Add extensibility points

📊 Changes

2 files changed (+21 additions, -8 deletions)

View changed files

📝 plist-cil/BinaryPropertyListParser.cs (+7 -2)
📝 plist-cil/BinaryPropertyListWriter.cs (+14 -6)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/claunia/plist-cil/pull/51 **Author:** [@qmfrederik](https://github.com/qmfrederik) **Created:** 10/16/2018 **Status:** ✅ Merged **Merged:** 10/18/2018 **Merged by:** [@claunia](https://github.com/claunia) **Base:** `master` ← **Head:** `features/extensibility` --- ### 📝 Commits (1) - [`66f86cf`](https://github.com/claunia/plist-cil/commit/66f86cff10b561ed2a043a1f8e2d4ef8382384cc) BinaryPropertyListParser/Writer: Add extensibility points ### 📊 Changes **2 files changed** (+21 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `plist-cil/BinaryPropertyListParser.cs` (+7 -2) 📝 `plist-cil/BinaryPropertyListWriter.cs` (+14 -6) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-30 21:27:01 +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#76