public void LoadText(string text) { ContentType = "text/html"; byte[] buf = EncodingText.GetBytes(text); ContentStream = (Stream)(new MemoryStream()); ContentStream.Write(buf, 0, buf.Length); }
public void AddText(string text, params object[] args) { byte[] buf = EncodingText.GetBytes(String.Format(text, args)); if (ContentStream == null) { ContentStream = (Stream)(new MemoryStream()); ContentType = ContentType ?? "text/html"; } ContentStream.Write(buf, 0, buf.Length); }