예제 #1
0
        protected bool LoadFromStream(Stream stream)
        {
            if (stream == null || !stream.CanRead)
            {
                return(false);
            }
            ConfigIndexFile <K> indexFile = this.IndexFile;

            if (indexFile == null)
            {
                return(false);
            }
            if (!indexFile.LoadFromStream(stream))
            {
                return(false);
            }
            var iter = indexFile.GetIter();

            while (iter.MoveNext())
            {
                if (m_DataMap == null)
                {
                    m_DataMap = new Dictionary <K, V>();
                }
                m_DataMap[iter.Current.Key] = null;
            }
            iter.Dispose();
            return(true);
        }
예제 #2
0
 public void Clear()
 {
     if (m_DataMap != null)
     {
         m_DataMap.Clear();
     }
     m_IndexFile = null;
 }