Implement X509Certificate2.RawDataMemory#57835
Implement X509Certificate2.RawDataMemory#57835GrabYourPitchforks merged 4 commits intodotnet:mainfrom
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 DetailsCloses #57448
|
|
I didn't go with the custom MemoryManager trick. For one I would probably have a difficult time figuring out how to do it correctly, and for two because it still feels a bit unnecessary to me. |
|
Should we doc that the returned |
What would documentation like that look like? I... think... given the API shape it's a reasonable expectation (otherwise it'd be a Would codifying in a test be more reasonable, or is that not strong enough? (I'm starting to think the test should exist regardless... let me add that). |
That's probably good enough honestly. Get the |
| { | ||
| ReadOnlyMemory<byte> first = cert.RawDataMemory; | ||
| ReadOnlyMemory<byte> second = cert.RawDataMemory; | ||
| Assert.True(first.Span == second.Span, "RawDataMemory returned different values."); |
There was a problem hiding this comment.
It's quite rare to see someone use == with spans and have it actually be correct ;-)
GrabYourPitchforks
left a comment
There was a problem hiding this comment.
Thanks also for the unit test update!
Closes #57448