Mercurial > pub > ImplabNet
view Implab.Test/UnitTest1.cs @ 251:7c7e9ad6fe4a v3
Prerelease version of RunnableComponent
Added draft messaging interfaces
Added more more helpers to Xml/SerializationHelpers
author | cin |
---|---|
date | Sun, 11 Feb 2018 00:49:51 +0300 |
parents | d82909310094 |
children | 6f4630d0bcd9 |
line wrap: on
line source
using System; using System.Diagnostics; using System.Threading; using Xunit; namespace Implab.Test { public class UnitTest1 { [Fact] public void Test1() { var listener = new TextWriterTraceListener(Console.Out); var source = new TraceSource("Custom",SourceLevels.ActivityTracing); source.Listeners.Add(listener); Trace.Listeners.Add(listener); Trace.WriteLine("Hello!"); Trace.CorrelationManager.StartLogicalOperation(); Trace.WriteLine("Inner"); foreach(var x in Trace.CorrelationManager.LogicalOperationStack) Trace.WriteLine($"-{x}"); source.TraceEvent(TraceEventType.Information, 1, "source event"); source.TraceData(TraceEventType.Start, 1, DateTime.Now); Trace.CorrelationManager.StopLogicalOperation(); } } }