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) {
|
|
9 var listener = new ConsoleTraceListener(true);
|
|
10 listener.Subscribe<TraceEvent>();
|
|
11
|
|
12 MTComponentContainer.AppContainer.Add(listener);
|
|
13
|
|
14 TraceLog.StartLogicalOperation("program");
|
|
15
|
|
16 Console.WriteLine("Hello World!");
|
|
17
|
|
18 TraceLog.StartLogicalOperation("async");
|
|
19 AsyncPool.Invoke(() => {
|
|
20 TraceLog.TraceInformation("Hello async");
|
|
21 TraceLog.StartLogicalOperation();
|
|
22 return 0;
|
|
23 })
|
|
24 .EndLogicalOperation()
|
|
25 .Join();
|
|
26
|
|
27 TraceLog.EndLogicalOperation();
|
|
28
|
|
29 }
|
|
30 }
|
|
31 }
|