Exemple #1
0
 public void Dispose()
 {
     if (IsDisposing)
     {
         return;
     }
     HStream.Close();
     WriteStream.Dispose();
 }
Exemple #2
0
        public void Clear()
        {
            WriteStream.Close();
            HStream.Close();
            File.Delete(HPath);

            HStream     = new FileStream(HPath, FileMode.OpenOrCreate, FileAccess.ReadWrite);
            ReadOffset  = 0;
            WriteStream = new StreamWriter(HStream, Encoding.UTF8, 256, true);
            HBuffer.Clear();
        }
Exemple #3
0
 private void ReadToBuffer()
 {
     HStream.Seek(0, SeekOrigin.Begin);
     using (StreamReader streamReader = new StreamReader(HStream, Encoding.UTF8, false, 1024, true))
     {
         string hline;
         while ((hline = streamReader.ReadLine()) != null)
         {
             HBuffer.Add(hline);
         }
     }
     HStream.Seek(0, SeekOrigin.End);
 }