Beispiel #1
0
        public void SaveTraceResult(TextWriter textWriter, TracerResult traceResult)
        {
            XDocument doc = new XDocument(
                new XElement("TracerApp", from threadTracerResult in traceResult.dThreadTracerResults.Values
                             select SaveThread(threadTracerResult)
                             ));

            using (XmlTextWriter xmlWriter = new XmlTextWriter(textWriter))
            {
                xmlWriter.Formatting = Formatting.Indented;
                doc.WriteTo(xmlWriter);
            }
        }
Beispiel #2
0
        public void SaveTraceResult(TextWriter textWriter, TracerResult traceResult)
        {
            var jtokens = from threadTracerResult in traceResult.dThreadTracerResults.Values
                          select SaveThreads(threadTracerResult);

            JObject traceResultJSON = new JObject
            {
                { "Thread", new JArray(jtokens) }
            };

            using (var jsonWriter = new JsonTextWriter(textWriter))
            {
                jsonWriter.Formatting = Formatting.Indented;
                traceResultJSON.WriteTo(jsonWriter);
            }
        }
Beispiel #3
0
 public TracerResult GetTraceResult()
 {
     tracerResult = new TracerResult(cdThreadTracers);
     return(tracerResult);
 }