Skip to content
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

Expose missing BinaryPrimitives APIs #82310

Merged
merged 3 commits into from
Feb 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions src/libraries/System.Memory/ref/System.Memory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,10 @@ public static partial class BinaryPrimitives
public static int ReadInt32LittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static long ReadInt64BigEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static long ReadInt64LittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static System.Int128 ReadInt128BigEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static System.Int128 ReadInt128LittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static nint ReadIntPtrBigEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static nint ReadIntPtrLittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static float ReadSingleBigEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static float ReadSingleLittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
Expand All @@ -452,6 +456,14 @@ public static partial class BinaryPrimitives
public static ulong ReadUInt64BigEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
public static ulong ReadUInt64LittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
public static System.UInt128 ReadUInt128BigEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
public static System.UInt128 ReadUInt128LittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
public static nuint ReadUIntPtrBigEndian(System.ReadOnlySpan<byte> source) { throw null; }
[System.CLSCompliantAttribute(false)]
public static nuint ReadUIntPtrLittleEndian(System.ReadOnlySpan<byte> source) { throw null; }
public static byte ReverseEndianness(byte value) { throw null; }
public static short ReverseEndianness(short value) { throw null; }
public static int ReverseEndianness(int value) { throw null; }
Expand Down Expand Up @@ -495,6 +507,10 @@ public static void ReverseEndianness(System.ReadOnlySpan<ushort> source, System.
public static bool TryReadInt32LittleEndian(System.ReadOnlySpan<byte> source, out int value) { throw null; }
public static bool TryReadInt64BigEndian(System.ReadOnlySpan<byte> source, out long value) { throw null; }
public static bool TryReadInt64LittleEndian(System.ReadOnlySpan<byte> source, out long value) { throw null; }
public static bool TryReadInt128BigEndian(System.ReadOnlySpan<byte> source, out System.Int128 value) { throw null; }
public static bool TryReadInt128LittleEndian(System.ReadOnlySpan<byte> source, out System.Int128 value) { throw null; }
public static bool TryReadIntPtrBigEndian(System.ReadOnlySpan<byte> source, out nint value) { throw null; }
public static bool TryReadIntPtrLittleEndian(System.ReadOnlySpan<byte> source, out nint value) { throw null; }
public static bool TryReadSingleBigEndian(System.ReadOnlySpan<byte> source, out float value) { throw null; }
public static bool TryReadSingleLittleEndian(System.ReadOnlySpan<byte> source, out float value) { throw null; }
[System.CLSCompliantAttribute(false)]
Expand All @@ -509,6 +525,14 @@ public static void ReverseEndianness(System.ReadOnlySpan<ushort> source, System.
public static bool TryReadUInt64BigEndian(System.ReadOnlySpan<byte> source, out ulong value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryReadUInt64LittleEndian(System.ReadOnlySpan<byte> source, out ulong value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryReadUInt128BigEndian(System.ReadOnlySpan<byte> source, out System.UInt128 value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryReadUInt128LittleEndian(System.ReadOnlySpan<byte> source, out System.UInt128 value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryReadUIntPtrBigEndian(System.ReadOnlySpan<byte> source, out nuint value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryReadUIntPtrLittleEndian(System.ReadOnlySpan<byte> source, out nuint value) { throw null; }
public static bool TryWriteDoubleBigEndian(System.Span<byte> destination, double value) { throw null; }
public static bool TryWriteDoubleLittleEndian(System.Span<byte> destination, double value) { throw null; }
public static bool TryWriteHalfBigEndian(System.Span<byte> destination, System.Half value) { throw null; }
Expand All @@ -519,6 +543,10 @@ public static void ReverseEndianness(System.ReadOnlySpan<ushort> source, System.
public static bool TryWriteInt32LittleEndian(System.Span<byte> destination, int value) { throw null; }
public static bool TryWriteInt64BigEndian(System.Span<byte> destination, long value) { throw null; }
public static bool TryWriteInt64LittleEndian(System.Span<byte> destination, long value) { throw null; }
public static bool TryWriteInt128BigEndian(System.Span<byte> destination, System.Int128 value) { throw null; }
public static bool TryWriteInt128LittleEndian(System.Span<byte> destination, System.Int128 value) { throw null; }
public static bool TryWriteIntPtrBigEndian(System.Span<byte> destination, nint value) { throw null; }
public static bool TryWriteIntPtrLittleEndian(System.Span<byte> destination, nint value) { throw null; }
public static bool TryWriteSingleBigEndian(System.Span<byte> destination, float value) { throw null; }
public static bool TryWriteSingleLittleEndian(System.Span<byte> destination, float value) { throw null; }
[System.CLSCompliantAttribute(false)]
Expand All @@ -533,6 +561,14 @@ public static void ReverseEndianness(System.ReadOnlySpan<ushort> source, System.
public static bool TryWriteUInt64BigEndian(System.Span<byte> destination, ulong value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryWriteUInt64LittleEndian(System.Span<byte> destination, ulong value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryWriteUInt128BigEndian(System.Span<byte> destination, System.UInt128 value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryWriteUInt128LittleEndian(System.Span<byte> destination, System.UInt128 value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryWriteUIntPtrBigEndian(System.Span<byte> destination, nuint value) { throw null; }
[System.CLSCompliantAttribute(false)]
public static bool TryWriteUIntPtrLittleEndian(System.Span<byte> destination, nuint value) { throw null; }
public static void WriteDoubleBigEndian(System.Span<byte> destination, double value) { }
public static void WriteDoubleLittleEndian(System.Span<byte> destination, double value) { }
public static void WriteHalfBigEndian(System.Span<byte> destination, System.Half value) { }
Expand All @@ -543,6 +579,10 @@ public static void WriteInt32BigEndian(System.Span<byte> destination, int value)
public static void WriteInt32LittleEndian(System.Span<byte> destination, int value) { }
public static void WriteInt64BigEndian(System.Span<byte> destination, long value) { }
public static void WriteInt64LittleEndian(System.Span<byte> destination, long value) { }
public static void WriteInt128BigEndian(System.Span<byte> destination, System.Int128 value) { }
public static void WriteInt128LittleEndian(System.Span<byte> destination, System.Int128 value) { }
public static void WriteIntPtrBigEndian(System.Span<byte> destination, nint value) { }
public static void WriteIntPtrLittleEndian(System.Span<byte> destination, nint value) { }
public static void WriteSingleBigEndian(System.Span<byte> destination, float value) { }
public static void WriteSingleLittleEndian(System.Span<byte> destination, float value) { }
[System.CLSCompliantAttribute(false)]
Expand All @@ -557,6 +597,14 @@ public static void WriteUInt32LittleEndian(System.Span<byte> destination, uint v
public static void WriteUInt64BigEndian(System.Span<byte> destination, ulong value) { }
[System.CLSCompliantAttribute(false)]
public static void WriteUInt64LittleEndian(System.Span<byte> destination, ulong value) { }
[System.CLSCompliantAttribute(false)]
public static void WriteUInt128BigEndian(System.Span<byte> destination, System.UInt128 value) { }
[System.CLSCompliantAttribute(false)]
public static void WriteUInt128LittleEndian(System.Span<byte> destination, System.UInt128 value) { }
[System.CLSCompliantAttribute(false)]
public static void WriteUIntPtrBigEndian(System.Span<byte> destination, nuint value) { }
[System.CLSCompliantAttribute(false)]
public static void WriteUIntPtrLittleEndian(System.Span<byte> destination, nuint value) { }
}
}
namespace System.Buffers.Text
Expand Down
Loading