##// END OF EJS Templates
removed absolete Diagnostics classes
removed absolete Diagnostics classes

File last commit:

r252:6f4630d0bcd9 v3
r252:6f4630d0bcd9 v3
Show More
UnitTest1.cs
37 lines | 977 B | text/x-csharp | CSharpLexer
using System;
using System.Diagnostics;
using System.Threading;
using Implab.Diagnostics;
using Xunit;
namespace Implab.Test
{
using static Trace<UnitTest1>;
public class UnitTest1
{
[Fact]
public void Test1()
{
var listener = new TextWriterTraceListener(Console.Out);
var source = TraceSource;
source.Switch.Level = SourceLevels.All;
source.Listeners.Add(listener);
Trace.Listeners.Add(listener);
Trace.WriteLine("Hello!");
StartLogicalOperation();
Trace.WriteLine("Inner");
foreach(var x in Trace.CorrelationManager.LogicalOperationStack)
Trace.WriteLine($"-{x}");
Log("source event");
listener.IndentLevel = 1;
source.TraceData(TraceEventType.Start, 1, DateTime.Now);
StopLogicalOperation();
}
}
}