Program.cs
42 lines
| 894 B
| text/x-csharp
|
CSharpLexer
/ Implab.Playground / Program.cs
cin
|
r267 | using System; | ||
cin
|
r277 | using System.Collections.Generic; | ||
cin
|
r268 | using System.Diagnostics; | ||
cin
|
r284 | using System.Dynamic; | ||
cin
|
r272 | using System.Linq; | ||
cin
|
r278 | using Implab.Components; | ||
cin
|
r268 | using Implab.Diagnostics; | ||
cin
|
r267 | using Implab.ServiceHost.Unity; | ||
cin
|
r229 | using Implab.Xml; | ||
cin
|
r267 | using Unity; | ||
using Unity.Injection; | ||||
cin
|
r272 | using Unity.Registration; | ||
cin
|
r229 | |||
namespace Implab.Playground { | ||||
cin
|
r288 | using System.Reactive.Linq; | ||
cin
|
r286 | using static Trace<Bar>; | ||
class Foo { | ||||
cin
|
r277 | |||
cin
|
r267 | } | ||
cin
|
r286 | class Bar : Foo { | ||
cin
|
r278 | |||
cin
|
r267 | } | ||
cin
|
r229 | public class Program { | ||
cin
|
r255 | static void Main(string[] args) { | ||
cin
|
r287 | Trace<Foo>.Log("First!"); | ||
Log("+1!"); | ||||
cin
|
r279 | |||
cin
|
r288 | using(TraceRegistry.Global.OfType<TraceSourceChannel>().Subscribe(ch => { | ||
cin
|
r286 | Console.WriteLine($"{ch.Id}: {ch.Source.Name}"); | ||
cin
|
r287 | |||
cin
|
r288 | })) { | ||
cin
|
r286 | Trace<Foo>.Log("Hi!"); | ||
Log("Respect!"); | ||||
cin
|
r272 | } | ||
cin
|
r233 | } | ||
cin
|
r229 | |||
} | ||||
} | ||||