示例#1
0
 /// <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);
 }
示例#2
0
            /// <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());
            }