Skip to content

ReadOnlyMemoryExtensions Class ​

Definition ​

Extension methods for ReadOnlyMemory<T>.

c#
public static class ReadOnlyMemoryExtensions

View source

Methods ​

NameDescription
CreateWrappedSequence<T>(ReadOnlyMemory<T>, Int32)Creates a ReadOnlySequence<T> that wraps a ReadOnlyMemory<T>, starting at the specified index. The sequence contains two segments covering the same underlying memory, allowing sequential reading that wraps around the starting position.
GetInt16(ReadOnlyMemory<Byte>, Int32)Reads a little-endian Int16 from read-only memory at the specified index.
GetInt16(ReadOnlyMemory<Byte>, Int32, Endian)Reads a Int16 from read-only memory at the specified index using the specified endianness.
GetInt32(ReadOnlyMemory<Byte>, Int32)Reads a little-endian Int32 from read-only memory at the specified index.
GetInt32(ReadOnlyMemory<Byte>, Int32, Endian)Reads an Int32 from read-only memory at the specified index using the specified endianness.
GetInt64(ReadOnlyMemory<Byte>, Int32)Reads a little-endian Int64 from read-only memory at the specified index.
GetInt64(ReadOnlyMemory<Byte>, Int32, Endian)Reads a Int64 from read-only memory at the specified index using the specified endianness.
GetUInt16(ReadOnlyMemory<Byte>, Int32)Reads a little-endian UInt16 from read-only memory at the specified index.
GetUInt16(ReadOnlyMemory<Byte>, Int32, Endian)Reads a UInt16 from read-only memory at the specified index using the specified endianness.
GetUInt24(ReadOnlyMemory<Byte>, Int32)Reads a little-endian UInt24 from read-only memory at the specified index.
GetUInt24(ReadOnlyMemory<Byte>, Int32, Endian)Reads a UInt24 from read-only memory at the specified index using the specified endianness.
GetUInt32(ReadOnlyMemory<Byte>, Int32)Reads a little-endian UInt32 from read-only memory at the specified index.
GetUInt32(ReadOnlyMemory<Byte>, Int32, Endian)Reads a UInt32 from read-only memory at the specified index using the specified endianness.
GetUInt64(ReadOnlyMemory<Byte>, Int32)Reads a little-endian UInt64 from read-only memory at the specified index.
GetUInt64(ReadOnlyMemory<Byte>, Int32, Endian)Reads a UInt64 from read-only memory at the specified index using the specified endianness.