Program.cs
32 lines
| 858 B
| text/x-csharp
|
CSharpLexer
/ MonoPlay / Program.cs
|
r93 | using System; | ||
using Implab.Diagnostics; | ||||
using Implab.Parallels; | ||||
using Implab; | ||||
namespace MonoPlay { | ||||
class MainClass { | ||||
public static void Main(string[] args) { | ||||
|
r94 | if (args == null) | ||
throw new ArgumentNullException("args"); | ||||
|
r93 | var listener = new ConsoleTraceListener(true); | ||
listener.Subscribe<TraceEvent>(); | ||||
MTComponentContainer.AppContainer.Add(listener); | ||||
TraceLog.StartLogicalOperation("program"); | ||||
TraceLog.StartLogicalOperation("async"); | ||||
AsyncPool.Invoke(() => { | ||||
TraceLog.TraceInformation("Hello async"); | ||||
|
r94 | TraceLog.StartLogicalOperation("foo"); | ||
|
r93 | return 0; | ||
}) | ||||
.EndLogicalOperation() | ||||
.Join(); | ||||
TraceLog.EndLogicalOperation(); | ||||
} | ||||
} | ||||
} | ||||