##// END OF EJS Templates
improved tracing...
improved tracing added the application components container MTComponentContainer.AppContainer

File last commit:

r93:dc4942d09e74 v2
r93:dc4942d09e74 v2
Show More
Program.cs
31 lines | 813 B | text/x-csharp | CSharpLexer
using System;
using Implab.Diagnostics;
using Implab.Parallels;
using Implab;
namespace MonoPlay {
class MainClass {
public static void Main(string[] args) {
var listener = new ConsoleTraceListener(true);
listener.Subscribe<TraceEvent>();
MTComponentContainer.AppContainer.Add(listener);
TraceLog.StartLogicalOperation("program");
Console.WriteLine("Hello World!");
TraceLog.StartLogicalOperation("async");
AsyncPool.Invoke(() => {
TraceLog.TraceInformation("Hello async");
TraceLog.StartLogicalOperation();
return 0;
})
.EndLogicalOperation()
.Join();
TraceLog.EndLogicalOperation();
}
}
}