annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
249
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
1 using System;
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
2 using System.Diagnostics;
249
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
3 using System.Threading;
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
4 using Xunit;
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
5
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
6 namespace Implab.Test
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
7 {
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
8 public class UnitTest1
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
9 {
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
10 [Fact]
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
11 public void Test1()
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
12 {
251
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
13 var listener = new TextWriterTraceListener(Console.Out);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
14 var source = new TraceSource("Custom",SourceLevels.ActivityTracing);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
15
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
16 source.Listeners.Add(listener);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
17
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
18 Trace.Listeners.Add(listener);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
19 Trace.WriteLine("Hello!");
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
20 Trace.CorrelationManager.StartLogicalOperation();
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
21 Trace.WriteLine("Inner");
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
22 foreach(var x in Trace.CorrelationManager.LogicalOperationStack)
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
23 Trace.WriteLine($"-{x}");
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
24 source.TraceEvent(TraceEventType.Information, 1, "source event");
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
25 source.TraceData(TraceEventType.Start, 1, DateTime.Now);
7c7e9ad6fe4a Prerelease version of RunnableComponent
cin
parents: 249
diff changeset
26 Trace.CorrelationManager.StopLogicalOperation();
249
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
27 }
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
28 }
d82909310094 Implab.Test moved to xunit
cin
parents:
diff changeset
29 }