コード例 #1
0
 public DelimittedReadStream(DelimittedStreamReader reader, int?contentLength)
 {
     if (reader == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("reader");
     }
     this.reader        = reader;
     this.contentLength = contentLength;
 }
コード例 #2
0
 public MimeReader(Stream stream, string boundary)
 {
     if (stream == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("stream");
     }
     if (boundary == null)
     {
         throw DiagnosticUtility.ExceptionUtility.ThrowHelperArgumentNull("boundary");
     }
     this.reader        = new DelimittedStreamReader(stream);
     this.boundaryBytes = MimeWriter.GetBoundaryBytes(boundary);
     this.reader.Push(this.boundaryBytes, 0, 2);
 }