/// <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); }
/// <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); }