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); }
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); }
public static T Deserialize <T>(byte[] buffer) { return(FixedLengthFormatter.Deserialize <T>(buffer, 0)); }
public static void Deserialize(byte[] buffer, object graph) { FixedLengthFormatter.Deserialize(buffer, 0, graph); }
public static void Deserialize(IntPtr ptr, object graph) { FixedLengthFormatter.Deserialize(ptr, 0, graph); }