예제 #1
0
        static string GenerateCommentsContent(string value)
        {
            StringBuilder    content = new StringBuilder();
            StringWriter     writer  = new StringWriter(content);
            TextWriterLogger logger  = new TextWriterLogger(writer);

            logger.WriteValue("userComments", value);
            return(content.ToString());
        }
예제 #2
0
        LogifyClientExceptionReport CreateExceptionReport(Exception ex, IInfoCollector collector)
        {
            StringBuilder    content = new StringBuilder();
            StringWriter     writer  = new StringWriter(content);
            TextWriterLogger logger  = new TextWriterLogger(writer);

            logger.BeginWriteObject(String.Empty);
            try {
                collector.Process(ex, logger);
            }
            finally {
                logger.EndWriteObject(String.Empty);
            }

            LogifyClientExceptionReport report = new LogifyClientExceptionReport();

            report.ReportContent = content;
            report.Data          = logger.Data;
            return(report);
        }