Beispiel #1
0
 public virtual void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, params object[] data)
 {
     if (this.Filter != null && !this.Filter.ShouldTrace(eventCache, source, eventType, id, null, null, null, data))
     {
         return;
     }
     this.TraceData(eventCache, source, eventType, id, TraceListener.FormatArray(data, " "));
 }
Beispiel #2
0
 public virtual void TraceData(TraceEventCache eventCache, string source, TraceEventType eventType, int id, object data)
 {
     if (this.Filter != null && !this.Filter.ShouldTrace(eventCache, source, eventType, id, null, null, data, null))
     {
         return;
     }
     this.WriteLine(string.Format("{0} {1}: {2} : {3}", new object[]
     {
         source,
         eventType,
         id,
         data
     }));
     if (eventCache == null)
     {
         return;
     }
     if ((this.TraceOutputOptions & TraceOptions.ProcessId) != TraceOptions.None)
     {
         this.WriteLine("    ProcessId=" + eventCache.ProcessId);
     }
     if ((this.TraceOutputOptions & TraceOptions.LogicalOperationStack) != TraceOptions.None)
     {
         this.WriteLine("    LogicalOperationStack=" + TraceListener.FormatArray(eventCache.LogicalOperationStack, ", "));
     }
     if ((this.TraceOutputOptions & TraceOptions.ThreadId) != TraceOptions.None)
     {
         this.WriteLine("    ThreadId=" + eventCache.ThreadId);
     }
     if ((this.TraceOutputOptions & TraceOptions.DateTime) != TraceOptions.None)
     {
         this.WriteLine("    DateTime=" + eventCache.DateTime.ToString("o"));
     }
     if ((this.TraceOutputOptions & TraceOptions.Timestamp) != TraceOptions.None)
     {
         this.WriteLine("    Timestamp=" + eventCache.Timestamp);
     }
     if ((this.TraceOutputOptions & TraceOptions.Callstack) != TraceOptions.None)
     {
         this.WriteLine("    Callstack=" + eventCache.Callstack);
     }
 }