示例#1
0
 public static void Read(this IO.EndianReader s, out Guid value, bool respectEndian = true)
 {
     if (respectEndian)
     {
         uint   a = s.ReadUInt32();
         ushort b = s.ReadUInt16();
         ushort c = s.ReadUInt16();
         byte   d = s.ReadByte();
         byte   e = s.ReadByte();
         byte   f = s.ReadByte();
         byte   g = s.ReadByte();
         byte   h = s.ReadByte();
         byte   i = s.ReadByte();
         byte   j = s.ReadByte();
         byte   k = s.ReadByte();
         value = new Guid(a, b, c, d, e, f, g, h, i, j, k);
     }
     else
     {
         value = new Guid(s.ReadBytes(16));
     }
 }