Example #1
0
        public void LoadText(string text)
        {
            ContentType = "text/html";

            byte[] buf = EncodingText.GetBytes(text);
            ContentStream = (Stream)(new MemoryStream());
            ContentStream.Write(buf, 0, buf.Length);
        }
Example #2
0
        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);
        }