Exemple #1
0
 public Stream CreateWritableStream(string name)
 {
     VerifyType(name, typeof(Stream));
     VerifyLastStream();
     m_lastStream = new LengthEncodedWritableStream(m_writer, name);
     return(m_lastStream);
 }
Exemple #2
0
 private void VerifyLastStream()
 {
     if (m_lastStream != null)
     {
         if (!m_lastStream.Closed)
         {
             throw new InvalidOperationException("last stream");
         }
         m_lastStream = null;
     }
 }
Exemple #3
0
 public void Dispose()
 {
     if (!m_disposed)
     {
         m_writer.Write(string.Empty);
         m_disposed = true;
         if (m_lastStream != null)
         {
             m_lastStream.Dispose();
             m_lastStream = null;
         }
     }
 }