Beispiel #1
0
 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();
 }
Beispiel #2
0
 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();
 }
Beispiel #3
0
 public void StartTrace(String name)
 {
     _current = new Method(name, _parent);
     _parent.getCalledMethod().Add(_current);
     _parent = _current;
     _current.StartTrace();
 }