Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ PeekGuid()

unsafe Guid System.Reflection.Internal.MemoryBlock.PeekGuid ( int offset)
inlinepackage

Definition at line 215 of file MemoryBlock.cs.

216 {
217 CheckBounds(offset, sizeof(Guid));
218 byte* ptr = Pointer + offset;
219 if (BitConverter.IsLittleEndian)
220 {
221 return *(Guid*)ptr;
222 }
223 return new Guid(*ptr | (ptr[1] << 8) | (ptr[2] << 16) | (ptr[3] << 24), (short)(ptr[4] | (ptr[5] << 8)), (short)(ptr[6] | (ptr[7] << 8)), ptr[8], ptr[9], ptr[10], ptr[11], ptr[12], ptr[13], ptr[14], ptr[15]);
224 }
void CheckBounds(int offset, int byteCount)

References System.Reflection.Internal.MemoryBlock.CheckBounds(), System.Reflection.Metadata.Ecma335.Guid, System.BitConverter.IsLittleEndian, and System.offset.

Referenced by System.Reflection.Metadata.Ecma335.GuidHeap.GetGuid().