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