Esempio n. 1
0
 /// <summary>
 /// Adds the specified MHTML part.
 /// </summary>
 /// <param name="mhtmlPart">The MHTML part.</param>
 /// <param name="text">The text.</param>
 public virtual void Add(MhtmlPartBase mhtmlPart, string text)
 {
     if (mhtmlPart == null)
     {
         throw new ArgumentNullException("mhtmlPart");
     }
     if (string.IsNullOrEmpty(text))
     {
         throw new ArgumentNullException("text");
     }
     AppendBoundary();
     mhtmlPart.Encode(_w, text);
 }
Esempio n. 2
0
 /// <summary>
 /// Adds the specified MHTML part.
 /// </summary>
 /// <param name="mhtmlPart">The MHTML part.</param>
 /// <param name="stream">The stream.</param>
 public virtual void Add(MhtmlPartBase mhtmlPart, Stream stream)
 {
     if (mhtmlPart == null)
     {
         throw new ArgumentNullException("mhtmlPart");
     }
     if (stream == null)
     {
         throw new ArgumentNullException("stream");
     }
     AppendBoundary();
     mhtmlPart.Encode(_w, stream);
 }
Esempio n. 3
0
 /// <summary>
 /// Adds the specified URI.
 /// </summary>
 /// <param name="uri">The URI.</param>
 /// <param name="contentType">Type of the content.</param>
 /// <param name="contentEncoding">The content encoding.</param>
 /// <param name="text">The text.</param>
 public void Add(string uri, string contentType, string contentEncoding, string text)
 {
     Add(MhtmlPartBase.Create(uri, contentType, contentEncoding), text);
 }
Esempio n. 4
0
 /// <summary>
 /// Adds the specified URI.
 /// </summary>
 /// <param name="uri">The URI.</param>
 /// <param name="contentType">Type of the content.</param>
 /// <param name="contentEncoding">The content encoding.</param>
 /// <param name="stream">The stream.</param>
 public void Add(string uri, string contentType, string contentEncoding, Stream stream)
 {
     Add(MhtmlPartBase.Create(uri, contentType, contentEncoding), stream);
 }