Beispiel #1
0
        private XElement GetFormattedMethod(TracedMethodResult method)
        {
            XElement serializedTracedMethod = new XElement("method",
                                                           new XAttribute("name", method.GetName()),
                                                           new XAttribute("time", method.GetTime()),
                                                           new XAttribute("class", method.GetClass()));

            if (method.HasChildren())
            {
                InsertFormattedMethods(method.GetChildren(), serializedTracedMethod);
            }
            return(serializedTracedMethod);
        }
Beispiel #2
0
        private JToken GetFormattedMethod(TracedMethodResult method)
        {
            var serializedTracedMethod = new JObject
            {
                { "name", method.GetName() },
                { "class", method.GetClass() },
                { "time", method.GetTime() }
            };

            if (method.HasChildren())
            {
                serializedTracedMethod.Add("methods", GetFormattedMethods(method.GetChildren()));
            }
            return(serializedTracedMethod);
        }