private static XElement ToXElement(ProfilerRecord record) { return(new XElement("R", new XAttribute("code", record.Code), new XAttribute("type", record.IsStart? "start" : "end"), record.TimeStamp)); }
//**************************************** public SectionState(TimeSpan interval, TimeSpan time, ProfilerRecord current = default, ProfilerRecord previous = default) { _Interval = interval; _Current = current; _Previous = previous; if (interval == TimeSpan.Zero) { _Time = time; } else { _Time = RoundTo(time, interval); } }