Beispiel #1
0
 // 读前准备( 创建指针字典, 并不重置 读长度限制 )
 public void BeginRead()
 {
     if (idxStore == null)
     {
         idxStore = new Dict <uint, object>();
     }
     else
     {
         idxStore.Clear();
     }
     offsetRoot = offset;
 }
Beispiel #2
0
 // 写前准备( 创建指针字典, 存起始 offset )
 public void BeginWrite()
 {
     if (ptrStore == null)
     {
         ptrStore = new Dict <object, uint>();
     }
     else
     {
         ptrStore.Clear();
     }
     offsetRoot = dataLen;
 }
Beispiel #3
0
 // 将 v 转为 string( json 长相 )
 public string ToString <T>(T v) where T : IObject
 {
     objOffsets.Clear();
     sb.Clear();
     if (v == null)
     {
         sb.Append("null");
     }
     else
     {
         v.ToString(this);
     }
     return(sb.ToString());
 }
Beispiel #4
0
 public void Clear()
 {
     d0.Clear();
     d1.Clear();
 }