-
Notifications
You must be signed in to change notification settings - Fork 125
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
Add basic Span<T> support #483
Add basic Span<T> support #483
Conversation
It might be a good idea to add a define variable, eg |
I thought about doing this, but decided to wait for feedback to see what would be preferred. Since there aren't any plans to expose this under .NET Standard 2.0, |
I have no real strong opinions on introducing either |
I just realized your PR is based on |
…esolver into span-support
Thanks! |
This pull request adds basic support for
Span<T>
andReadOnlySpan<T>
to theAsmResolver
andAsmResolver.IO
namespaces.Support is only implemented for .NET Standard 2.1 and higher, no attempt has been made to provide
Span<T>
support for .NET Standard 2.0 as it would introduce a dependency onSystem.Memory
.This PR also does not attempt to take advantage of this new support within the library. This is most likely better left to a separate PR (and/or set of issues).
The following new types are provided to avoid source and binary breaking changes in existing code:
ISpanDataSource
andISpanBinaryStreamWriter
can be considered temporary, as they only exist to avoid the breaking change of adding a new member to the correspondingIDataSource
andIBinaryStreamWriter
interfaces. In the future, it may be desirable to remove them and take the break.