Struct VariantArrayReader
Zero-copy reader for a variant array value.
public ref struct VariantArrayReader
- Inherited Members
Remarks
Binary layout (after the header byte):
[num_elements: 1 or 4 bytes depending on is_large]
[offsets: (num_elements + 1) * offset_size bytes]
[element values: concatenated variant values]
Constructors
VariantArrayReader(ReadOnlySpan<byte>, ReadOnlySpan<byte>)
Creates an array reader from the metadata and the array value buffer.
public VariantArrayReader(ReadOnlySpan<byte> metadata, ReadOnlySpan<byte> value)
Parameters
metadataReadOnlySpan<byte>valueReadOnlySpan<byte>
Properties
ElementCount
Gets the number of elements in this array.
public int ElementCount { get; }
Property Value
Methods
GetElement(int)
Gets a VariantReader for the element at the given index.
public VariantReader GetElement(int index)
Parameters
indexint