diff options
author | Ahson Khan <ahkha@microsoft.com> | 2018-03-22 04:03:02 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2018-03-22 05:45:10 +0300 |
commit | 5b3316913d634b379087fbadc82295b6eddf3882 (patch) | |
tree | 41c9bc50ecea461b3f7f746532c6cf17f8c95543 /src | |
parent | 9751537e646487e441438e73fd935f40ca57957c (diff) |
Rename {Try}Read/WriteMachineEndian to just {Try}Read/Write (#17106)
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs index 2c277e671..b4b17b037 100644 --- a/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs +++ b/src/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs @@ -131,7 +131,7 @@ namespace System.Runtime.InteropServices /// Reads a structure of type T out of a read-only span of bytes. /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static T ReadMachineEndian<T>(ReadOnlySpan<byte> source) + public static T Read<T>(ReadOnlySpan<byte> source) where T : struct { #if netstandard @@ -157,7 +157,7 @@ namespace System.Runtime.InteropServices /// <returns>If the span is too small to contain the type T, return false.</returns> /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool TryReadMachineEndian<T>(ReadOnlySpan<byte> source, out T value) + public static bool TryRead<T>(ReadOnlySpan<byte> source, out T value) where T : struct { #if netstandard @@ -184,7 +184,7 @@ namespace System.Runtime.InteropServices /// Writes a structure of type T into a span of bytes. /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static void WriteMachineEndian<T>(Span<byte> destination, ref T value) + public static void Write<T>(Span<byte> destination, ref T value) where T : struct { #if netstandard @@ -210,7 +210,7 @@ namespace System.Runtime.InteropServices /// <returns>If the span is too small to contain the type T, return false.</returns> /// </summary> [MethodImpl(MethodImplOptions.AggressiveInlining)] - public static bool TryWriteMachineEndian<T>(Span<byte> destination, ref T value) + public static bool TryWrite<T>(Span<byte> destination, ref T value) where T : struct { #if netstandard |