예제 #1
0
        public static void Error(string error)
        {
            var trace = new SingleTrace();

            trace.Type = SingleTrace.TraceType.Error;
            trace.Text = error;
            AddTrace(trace);
        }
예제 #2
0
        public static void Warning(string warning)
        {
            var trace = new SingleTrace();

            trace.Type = SingleTrace.TraceType.Warning;
            trace.Text = warning;
            AddTrace(trace);
        }
예제 #3
0
        public static void Info(string info)
        {
            var trace = new SingleTrace();

            trace.Type = SingleTrace.TraceType.Info;
            trace.Text = info;
            AddTrace(trace);
        }
예제 #4
0
        public void AddTrace(SingleTrace trace)
        {
            if (trace == null)
            {
                throw new ArgumentNullException();
            }

            Traces.Add(trace);
        }
예제 #5
0
        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);
        }
예제 #6
0
 static void AddTrace(SingleTrace trace)
 {
     trace.Stacktrace = FormatStackTrace(Environment.StackTrace);
     Workspace.Instance?.AddTrace(trace);
 }