Exemple #1
0
 public static Guid Convert(Uuid64 a, Uuid64 b)
 {
     unsafe
     {
         byte *buf = stackalloc byte[16];
         a.WriteToUnsafe(buf);
         b.WriteToUnsafe(buf + 8);
         return(ReadUnsafe(buf));
     }
 }
Exemple #2
0
        public static Guid Convert(Uuid64 a, uint b, uint c)
        {
            unsafe
            {
                byte *buf = stackalloc byte[16];
                a.WriteToUnsafe(buf);

                buf[8]  = (byte)b;
                buf[9]  = (byte)(b >> 8);
                buf[10] = (byte)(b >> 16);
                buf[11] = (byte)(b >> 24);

                buf[12] = (byte)c;
                buf[13] = (byte)(c >> 8);
                buf[14] = (byte)(c >> 16);
                buf[15] = (byte)(c >> 24);

                return(ReadUnsafe(buf));
            }
        }