Struct PamojaId
A 16-byte identifier carried inline inside a blittable struct.
public struct PamojaId
- Inherited Members
Remarks
The C ABI declares vendor and device-class identifiers as fixed arrays inside a struct that crosses by value, so the managed mirror needs a type of exactly that width rather than a reference to bytes held elsewhere.
Fields
Length
The width of an identifier, in bytes.
public const int Length = 16
Field Value
Methods
From(ReadOnlySpan<byte>, string)
Reads an identifier from exactly 16 bytes.
public static PamojaId From(ReadOnlySpan<byte> bytes, string name)
Parameters
bytesReadOnlySpan<byte>The identifier.
namestringWhat the bytes are, for the exception message.
Returns
- PamojaId
The identifier.
Exceptions
- ArgumentException
bytesis not Length bytes.
ToArray()
Copies an identifier out as an array.
public readonly byte[] ToArray()
Returns
- byte[]
The 16 bytes.