93
|
1 using System;
|
|
2 using Implab.Diagnostics;
|
|
3 using Implab.Parallels;
|
|
4 using Implab;
|
|
5
|
|
6 namespace MonoPlay {
|
|
7 class MainClass {
|
|
8 public static void Main(string[] args) {
|
94
|
9 if (args == null)
|
|
10 throw new ArgumentNullException("args");
|
|
11
|
93
|
12 var listener = new ConsoleTraceListener(true);
|
|
13 listener.Subscribe<TraceEvent>();
|
|
14
|
|
15 MTComponentContainer.AppContainer.Add(listener);
|
|
16
|
|
17 TraceLog.StartLogicalOperation("program");
|
|
18
|
|
19 TraceLog.StartLogicalOperation("async");
|
|
20 AsyncPool.Invoke(() => {
|
|
21 TraceLog.TraceInformation("Hello async");
|
94
|
22 TraceLog.StartLogicalOperation("foo");
|
93
|
23 return 0;
|
|
24 })
|
|
25 .EndLogicalOperation()
|
|
26 .Join();
|
|
27
|
|
28 TraceLog.EndLogicalOperation();
|
|
29
|
|
30 }
|
|
31 }
|
|
32 }
|