Exemple #1
0
 private Object FromNetValueType(Type tp)
 {
     byte[] data = Buffer.Extract(Globs.SizeOf(tp));
     if (Repr == DataRepresentation.Tpm)
     {
         return(Globs.NetToHostValue(tp, data));
     }
     if (Repr == DataRepresentation.LittleEndian)
     {
         return(Globs.FromBytes(tp, data));
     }
     // Unsupported type
     Debug.Assert(false);
     return(null);
 }