[PdfKit] Implement manual bindings for PdfViewAnnotationHitEventArgs.AnnotationHit.#25068
[PdfKit] Implement manual bindings for PdfViewAnnotationHitEventArgs.AnnotationHit.#25068rolfbjarne merged 2 commits intomainfrom
Conversation
…AnnotationHit. Because it's accessed using a literal string, not a constant string.
There was a problem hiding this comment.
Pull request overview
Adds a manual managed binding for PdfViewAnnotationHitEventArgs.AnnotationHit in PdfKit, because Apple’s userInfo key is a literal string ("PDFAnnotationHit") rather than an exported constant.
Changes:
- Added a new partial implementation of
PdfViewAnnotationHitEventArgs.AnnotationHitthat reads"PDFAnnotationHit"fromNSNotification.UserInfo. - Removed the incorrect generated
[Export ("PDFAnnotationHit")]property from the binding definition so it won’t be emitted as a (non-existent) native constant lookup. - Added monotouch tests to validate
AnnotationHitextraction (including a missing-UserInfocase).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| tests/monotouch-test/PdfKit/PdfAnnotationTest.cs | Adds tests that build an NSNotification with userInfo["PDFAnnotationHit"] and validate AnnotationHit behavior. |
| src/PdfKit/PdfViewAnnotationHitEventArgs.cs | New manual partial binding that reads the literal userInfo key and returns a PdfAnnotation. |
| src/pdfkit.cs | Removes the autogenerated binding member for AnnotationHit and notes it’s manually bound. |
| src/frameworks.sources | Ensures the new manual binding source file is compiled into the PdfKit sources. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
✅ [CI Build #760f726] Build passed (Build packages) ✅Pipeline on Agent |
✅ [PR Build #760f726] Build passed (Detect API changes) ✅Pipeline on Agent |
✅ API diff for current PR / commitNET (empty diffs)✅ API diff vs stableNET (empty diffs)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
✅ [CI Build #760f726] Build passed (Build macOS tests) ✅Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build #760f726] Test results 🚀Test results✅ All tests passed on VSTS: test results. 🎉 All 156 tests passed 🎉 Tests counts✅ cecil: All 1 tests passed. [attempt 2] Html Report (VSDrops) Download macOS tests✅ Tests on macOS Monterey (12): All 5 tests passed. Html Report (VSDrops) Download Linux Build VerificationPipeline on Agent |
Because it's accessed using a literal string, not a constant string.