コード例 #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);
            }
        }
コード例 #2
0
ファイル: JsonSerializer.cs プロジェクト: larvailor/Tracer
        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);
            }
        }
コード例 #3
0
ファイル: Tracer.cs プロジェクト: larvailor/Tracer
 public TracerResult GetTraceResult()
 {
     tracerResult = new TracerResult(cdThreadTracers);
     return(tracerResult);
 }