-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Implement IEnumerable<> on various X509 collection types #53129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
|
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue Detailsclose #49878
|
|
Thanks. Note the linked issue linked to a commit that sketched out the changes (stephentoub@d310e84), and as part of that, it updated places that were then unnecessarily using OfType... it'd be good to do the same here. Also, this PR should also be adding tests exercising the new interfaces (or if existing tests end up exercising the new interfaces, that then means they're no longer exercising the old ones, so new tests should be added for those). |
...braries/System.Security.Cryptography.Pkcs/src/System/Security/Cryptography/Pkcs/SignedCms.cs
Outdated
Show resolved
Hide resolved
|
I'm a little bit confused with adding tests All existed tests seems like that runtime/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs Lines 174 to 203 in 3846a9c
or that runtime/src/libraries/System.Security.Cryptography.X509Certificates/tests/CollectionTests.cs Lines 380 to 395 in 3846a9c
Should I really add exactly same for typed |
Since it's the same method bodies providing the behavior, nah. |
bartonjs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Added Steve to see if he has any remaining thoughts based on the prototype/investigation work.
| public void Reset() { } | ||
| bool System.Collections.IEnumerator.MoveNext() { throw null; } | ||
| void System.Collections.IEnumerator.Reset() { } | ||
| void System.IDisposable.Dispose() { } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bartonjs, opinion on this being explicitly implemented vs implicitly? (here and for the other dispose methods)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For a sealed type that most people never use directly where it's a no-op merely required by interface inheritance? Nah.
stephentoub
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
close #49878