Struct SpanReader (original) (raw)
Namespace
Assembly
LiteEntitySystem.dll
public ref struct SpanReaderConstructors
SpanReader(ReadOnlySpan)
public SpanReader(ReadOnlySpan<byte> rawData)Parameters
rawData ReadOnlySpan<byte>
Fields
Position
Field Value
RawData
public readonly ReadOnlySpan<byte> RawDataField Value
Properties
AvailableBytes
public int AvailableBytes { get; }Property Value
Methods
Get(out bool)
public void Get(out bool result)Parameters
result bool
Get(out byte)
public void Get(out byte result)Parameters
result byte
Get(out char)
public void Get(out char result)Parameters
result char
Get(out double)
public void Get(out double result)Parameters
result double
Get(out Guid)
public void Get(out Guid result)Parameters
result Guid
Get(out short)
public void Get(out short result)Parameters
result short
Get(out int)
public void Get(out int result)Parameters
result int
Get(out long)
public void Get(out long result)Parameters
result long
Get(out sbyte)
public void Get(out sbyte result)Parameters
result sbyte
Get(out float)
public void Get(out float result)Parameters
result float
Get(out string)
public void Get(out string result)Parameters
result string
Get(out string, int)
public void Get(out string result, int maxLength)Parameters
result string
maxLength int
Get(out ushort)
public void Get(out ushort result)Parameters
result ushort
Get(out uint)
public void Get(out uint result)Parameters
result uint
Get(out ulong)
public void Get(out ulong result)Parameters
result ulong
GetArray()
public T[] GetArray<T>() where T : ISpanSerializable, new()Returns
T[]
Type Parameters
T
GetArray(Func)
public T[] GetArray<T>(Func<T> constructor) where T : class, ISpanSerializableParameters
constructor Func
Returns
T[]
Type Parameters
T
GetArray(ushort)
public T[] GetArray<T>(ushort size) where T : unmanagedParameters
size ushort
Returns
T[]
Type Parameters
T
GetBool()
Returns
GetBoolArray()
public bool[] GetBoolArray()Returns
bool[]
GetByte()
Returns
GetBytes(byte[], int)
public void GetBytes(byte[] destination, int count)Parameters
destination byte[]
count int
GetBytes(byte[], int, int)
public void GetBytes(byte[] destination, int start, int count)Parameters
destination byte[]
start int
count int
GetBytesWithLength()
public byte[] GetBytesWithLength()Returns
byte[]
GetChar()
Returns
GetDouble()
public double GetDouble()Returns
GetDoubleArray()
public double[] GetDoubleArray()Returns
double[]
GetFloat()
Returns
GetFloatArray()
public float[] GetFloatArray()Returns
float[]
GetGuid()
Returns
GetInt()
Returns
GetIntArray()
public int[] GetIntArray()Returns
int[]
GetLargeString()
public string GetLargeString()Returns
GetLong()
Returns
GetLongArray()
public long[] GetLongArray()Returns
long[]
GetRemainingBytes()
public byte[] GetRemainingBytes()Returns
byte[]
GetRemainingBytesSpan()
public ReadOnlySpan<byte> GetRemainingBytesSpan()Returns
GetSByte()
Returns
GetSBytesWithLength()
public sbyte[] GetSBytesWithLength()Returns
sbyte[]
GetShort()
Returns
GetShortArray()
public short[] GetShortArray()Returns
short[]
GetString()
public string GetString()Returns
GetString(int)
Note that "maxLength" only limits the number of characters in a string, not its size in bytes.
public string GetString(int maxLength)Parameters
maxLength int
Returns
"string.Empty" if value > "maxLength"
GetStringArray()
public string[] GetStringArray()Returns
string[]
GetStringArray(int)
Note that "maxStringLength" only limits the number of characters in a string, not its size in bytes. Strings that exceed this parameter are returned as empty
public string[] GetStringArray(int maxStringLength)Parameters
maxStringLength int
Returns
string[]
GetStruct()
public T GetStruct<T>() where T : unmanagedReturns
T
Type Parameters
T
GetStruct(out T)
public void GetStruct<T>(out T result) where T : unmanagedParameters
result T
Type Parameters
T
GetUInt()
Returns
GetUIntArray()
public uint[] GetUIntArray()Returns
uint[]
GetULong()
Returns
GetULongArray()
public ulong[] GetULongArray()Returns
ulong[]
GetUShort()
public ushort GetUShort()Returns
GetUShortArray()
public ushort[] GetUShortArray()Returns
ushort[]
Get()
public T Get<T>() where T : struct, ISpanSerializableReturns
T
Type Parameters
T
Get(Func)
public T Get<T>(Func<T> constructor) where T : class, ISpanSerializableParameters
constructor Func
Returns
T
Type Parameters
T
Get(out T)
public void Get<T>(out T result) where T : struct, ISpanSerializableParameters
result T
Type Parameters
T
Get(out T, Func)
public void Get<T>(out T result, Func<T> constructor) where T : class, ISpanSerializableParameters
result T
constructor Func
Type Parameters
T
PeekBool()
Returns
PeekByte()
Returns
PeekChar()
Returns
PeekDouble()
public double PeekDouble()Returns
PeekFloat()
Returns
PeekInt()
Returns
PeekLong()
Returns
PeekSByte()
Returns
PeekShort()
Returns
PeekString()
public string PeekString()Returns
PeekString(int)
Note that "maxLength" only limits the number of characters in a string, not its size in bytes.
public string PeekString(int maxLength)Parameters
maxLength int
Returns
PeekUInt()
Returns
PeekULong()
Returns
PeekUShort()
public ushort PeekUShort()Returns
TryGetBool(out bool)
public bool TryGetBool(out bool result)Parameters
result bool
Returns
TryGetByte(out byte)
public bool TryGetByte(out byte result)Parameters
result byte
Returns
TryGetBytesWithLength(out byte[])
public bool TryGetBytesWithLength(out byte[] result)Parameters
result byte[]
Returns
TryGetChar(out char)
public bool TryGetChar(out char result)Parameters
result char
Returns
TryGetDouble(out double)
public bool TryGetDouble(out double result)Parameters
result double
Returns
TryGetFloat(out float)
public bool TryGetFloat(out float result)Parameters
result float
Returns
TryGetInt(out int)
public bool TryGetInt(out int result)Parameters
result int
Returns
TryGetLong(out long)
public bool TryGetLong(out long result)Parameters
result long
Returns
TryGetSByte(out sbyte)
public bool TryGetSByte(out sbyte result)Parameters
result sbyte
Returns
TryGetShort(out short)
public bool TryGetShort(out short result)Parameters
result short
Returns
TryGetString(out string)
public bool TryGetString(out string result)Parameters
result string
Returns
TryGetStringArray(out string[])
public bool TryGetStringArray(out string[] result)Parameters
result string[]
Returns
TryGetUInt(out uint)
public bool TryGetUInt(out uint result)Parameters
result uint
Returns
TryGetULong(out ulong)
public bool TryGetULong(out ulong result)Parameters
result ulong
Returns
TryGetUShort(out ushort)
public bool TryGetUShort(out ushort result)Parameters
result ushort