-
Notifications
You must be signed in to change notification settings - Fork 257
I have noticed some inconsistent behavior when iterating over a PdfAcroFieldCollection.
- Iterating using the enumerator returns objects of type PdfItem
- Accessing the collection using indexes returns objects of type PdfAcroField
I believe this behavior should be aligned, so the virtual GetEnumerator() method from PdfArray should be overridden in PdfAcroFieldCollection to use the same PdfAcroFieldCollection.CreateAcroField(pdfDictonary) method as in the indexer.
Also, this method doesn't have any reason to be a private instance method, it can be a public static one as it does not access instance data. This would be helpful since we cannot instantiate any PdfAcroField subtype because their constructors are internal.
I would be happy to create a PR for this change.
Let me know your thoughts on this,
Sabin
All reactions
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment