public string GetRtf(string message, string trace)
        {
            RichTextWriter writer = new RichTextWriter("C#");

            string[] strs;

            if (!String.IsNullOrEmpty(message))
            {
                strs = message.Split('\r', '\n');
                foreach (string s in strs)
                {
                    writer.WriteDeclaration(s);
                    writer.WriteLine();
                }
                writer.WriteLine();
            }

            if (!String.IsNullOrEmpty(trace))
            {
                strs = trace.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string s in strs)
                {
                    writer.Write(s);
                    writer.WriteLine();
                }
                writer.WriteLine();
            }

            return(writer.ToString());
        }
		public RichTextFormatter(string language)
		{
            writer = new RichTextWriter(language);
		}	
        public string GetRtf(string message, string trace)
        {
            RichTextWriter writer = new RichTextWriter("C#");

            string[] strs;

            if (!String.IsNullOrEmpty(message))
            {
                strs = message.Split('\r', '\n');
                foreach (string s in strs)
                {
                    writer.WriteDeclaration(s);
                    writer.WriteLine();
                }
                writer.WriteLine();
            }

            if (!String.IsNullOrEmpty(trace))
            {
                strs = trace.Split(new char[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);
                foreach (string s in strs)
                {
                    writer.Write(s);
                    writer.WriteLine();
                }
                writer.WriteLine();
            }

            return writer.ToString();
        }