Ejemplo n.º 1
0
 public static void Deserialize(byte[] buffer, long ofs, object graph)
 {
     if (ListUnit.IsNullOrEmpty <byte>(buffer))
     {
         throw new ArgumentException();
     }
     FixedLengthFormatter.Deserialize(Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), ofs, graph);
 }
Ejemplo n.º 2
0
 public static byte[] Serialize(object graph)
 {
     if (graph == null)
     {
         throw new ArgumentNullException("graph");
     }
     byte[] buffer = new byte[FixedLengthFormatter.SizeOf(graph)];
     Marshal.StructureToPtr(graph, Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), true);
     return(buffer);
 }
Ejemplo n.º 3
0
 public static T Deserialize <T>(byte[] buffer)
 {
     return(FixedLengthFormatter.Deserialize <T>(buffer, 0));
 }
Ejemplo n.º 4
0
 public static void Deserialize(byte[] buffer, object graph)
 {
     FixedLengthFormatter.Deserialize(buffer, 0, graph);
 }
Ejemplo n.º 5
0
 public static void Deserialize(IntPtr ptr, object graph)
 {
     FixedLengthFormatter.Deserialize(ptr, 0, graph);
 }