Exemplo n.º 1
0
 public static void Deserialize(byte[] buffer, long ofs, object graph)
 {
     if (ListUtils.IsNullOrEmpty <byte>(buffer))
     {
         throw new ArgumentException();
     }
     FixedLengthFormatter.Deserialize(Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), ofs, graph);
 }
Exemplo 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);
 }
Exemplo n.º 3
0
 public static T Deserialize <T>(byte[] buffer)
 {
     return(FixedLengthFormatter.Deserialize <T>(buffer, 0));
 }
Exemplo n.º 4
0
 public static void Deserialize(byte[] buffer, object graph)
 {
     FixedLengthFormatter.Deserialize(buffer, 0, graph);
 }
Exemplo n.º 5
0
 public static void Deserialize(IntPtr ptr, object graph)
 {
     FixedLengthFormatter.Deserialize(ptr, 0, graph);
 }