summaryrefslogtreecommitdiff
path: root/src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs
diff options
context:
space:
mode:
authorAhson Khan <ahkha@microsoft.com>2018-03-01 13:18:37 -0800
committerGitHub <noreply@github.com>2018-03-01 13:18:37 -0800
commite15c9d0894f70aa53905fbbe8e72b4b863da0555 (patch)
treedd23bc5968ae9927b3e91d125b576e90e17acfd7 /src/mscorlib/shared/System/IO/UnmanagedMemoryStream.cs
parent3a9fb9744fe0d02137edbe4dbf13ee41b5cca686 (diff)
downloadcoreclr-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.cs2
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));
}