public static void Error(string error) { var trace = new SingleTrace(); trace.Type = SingleTrace.TraceType.Error; trace.Text = error; AddTrace(trace); }
public static void Warning(string warning) { var trace = new SingleTrace(); trace.Type = SingleTrace.TraceType.Warning; trace.Text = warning; AddTrace(trace); }
public static void Info(string info) { var trace = new SingleTrace(); trace.Type = SingleTrace.TraceType.Info; trace.Text = info; AddTrace(trace); }
public void AddTrace(SingleTrace trace) { if (trace == null) { throw new ArgumentNullException(); } Traces.Add(trace); }
Workspace() { var all = new VisibleTraceType(SingleTrace.TraceType.All); all.IsSelected = true; VisibleTraceTypes.Add(all); VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Info)); VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Warning)); VisibleTraceTypes.Add(new VisibleTraceType(SingleTrace.TraceType.Error)); var trace1 = new SingleTrace(); trace1.Text = "Hello"; trace1.Type = SingleTrace.TraceType.Info; var trace2 = new SingleTrace(); trace2.Text = "Bye"; trace2.Type = SingleTrace.TraceType.Info; Traces.Add(trace1); Traces.Add(trace2); }
static void AddTrace(SingleTrace trace) { trace.Stacktrace = FormatStackTrace(Environment.StackTrace); Workspace.Instance?.AddTrace(trace); }