示例#1
0
 public Stream CreateWritableStream(string name)
 {
     VerifyType(name, typeof(Stream));
     VerifyLastStream();
     m_lastStream = new LengthEncodedWritableStream(m_writer, name);
     return(m_lastStream);
 }
示例#2
0
 private void VerifyLastStream()
 {
     if (m_lastStream != null)
     {
         if (!m_lastStream.Closed)
         {
             throw new InvalidOperationException("last stream");
         }
         m_lastStream = null;
     }
 }
示例#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;
         }
     }
 }