private void WriteMethodInfo(XmlTextWriter xWriter, Method method) { xWriter.WriteStartElement("name"); xWriter.WriteString(method.getName()); xWriter.WriteEndElement(); xWriter.WriteStartElement("time"); xWriter.WriteString(method.getTime().ToString()); xWriter.WriteEndElement(); xWriter.WriteStartElement("Methods"); for (int i = 0; i < method.getCalledMethod().Count; i++) { WriteMethodInfo(xWriter, method.getCalledMethod()[i]); } xWriter.WriteEndElement(); }
private void WriteMethodInfo(JsonWriter writer, Method method) { writer.WriteStartObject(); writer.WritePropertyName("name"); writer.WriteValue(method.getName()); writer.WritePropertyName("time"); writer.WriteValue(method.getTime()); writer.WritePropertyName("methods"); writer.WriteStartArray(); for (int i = 0; i < method.getCalledMethod().Count; i++) { WriteMethodInfo(writer, method.getCalledMethod()[i]); } writer.WriteEndArray(); writer.WriteEndObject(); }
public void StartTrace(String name) { _current = new Method(name, _parent); _parent.getCalledMethod().Add(_current); _parent = _current; _current.StartTrace(); }