diff options
author | Ahson Khan <ahkha@microsoft.com> | 2018-03-01 13:18:37 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-01 13:18:37 -0800 |
commit | e15c9d0894f70aa53905fbbe8e72b4b863da0555 (patch) | |
tree | dd23bc5968ae9927b3e91d125b576e90e17acfd7 /src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs | |
parent | 3a9fb9744fe0d02137edbe4dbf13ee41b5cca686 (diff) | |
download | coreclr-e15c9d0894f70aa53905fbbe8e72b4b863da0555.tar.gz coreclr-e15c9d0894f70aa53905fbbe8e72b4b863da0555.tar.bz2 coreclr-e15c9d0894f70aa53905fbbe8e72b4b863da0555.zip |
Move MemoryExtensions.TryGetString to MemoryMarshal and remove TryGetArray (#16692)
* Remove Span.NonGenerics and update leftover AsRoS -> AsSpan changes
* Move MemoryExtensions.TryGetString to MemoryMarshal and remove TryGetArray
* Move TryGetString to common MemoryMarshal.cs
* Remove the `this` keyword, not an extension method
Diffstat (limited to 'src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs')
-rw-r--r-- | src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs b/src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs index 2f0f34afee..d1a13156a8 100644 --- a/src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs +++ b/src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs @@ -510,7 +510,7 @@ namespace System.IO // something other than an array and this is an UnmanagedMemoryStream-derived type that doesn't override Read(Span<byte>) will // it then fall back to doing the ArrayPool/copy behavior. return new ValueTask<int>( - destination.TryGetArray(out ArraySegment<byte> destinationArray) ? + MemoryMarshal.TryGetArray(destination, out ArraySegment<byte> destinationArray) ? Read(destinationArray.Array, destinationArray.Offset, destinationArray.Count) : Read(destination.Span)); } |