/// <summary></summary> public static void Add(this Storage storage, string key, PointRkdTreeDData data, CancellationToken ct) { storage.f_add(key, data, () => { var ms = new MemoryStream(); using (var coder = new BinaryWritingCoder(ms)) { object x = data; coder.Code(ref x); } return(ms.ToArray()); }, ct); }
/// <summary>PointRkdTreeDData -> byte[]</summary> public static byte[] PointRkdTreeDDataToBuffer(PointRkdTreeDData data) { if (data == null) { return(null); } var ms = new MemoryStream(); using (var coder = new BinaryWritingCoder(ms)) { object x = data; coder.Code(ref x); } return(ms.ToArray()); }