diff Implab.Playground/Program.cs @ 268:0be8a6ae8307 v3

Implemented typereference parser
author cin
date Sun, 22 Apr 2018 15:29:10 +0300
parents 6b3e5c48131b
children ff581cff7003
line wrap: on
line diff
--- a/Implab.Playground/Program.cs	Fri Apr 20 19:05:12 2018 +0300
+++ b/Implab.Playground/Program.cs	Sun Apr 22 15:29:10 2018 +0300
@@ -1,4 +1,6 @@
 using System;
+using System.Diagnostics;
+using Implab.Diagnostics;
 using Implab.ServiceHost.Unity;
 using Implab.Xml;
 using Unity;
@@ -30,9 +32,20 @@
         static void Main(string[] args) {
             var container = new UnityContainer();
 
-            var containerConfig = SerializationHelpers.DeserializeFromFile<ContainerElement>("data/sample.xml");
+            var listener = new SimpleTraceListener(Console.Out);
+            Trace<ConfigurationContext>.TraceSource.Switch.Level = SourceLevels.All;
+            Trace<ConfigurationContext>.TraceSource.Listeners.Add(listener);
+
+            var c = new Container<int>();
 
-            Console.WriteLine($"container: {containerConfig.Registrations.Count}");
+            var cts = new ConfigurationContext();
+            cts.AddNamespace("System");
+            cts.AddNamespace("System.Collections.Generic");
+            cts.AddNamespace("Implab.Playground");
+
+            Console.WriteLine(c.GetType().FullName);
+
+            cts.Resolve("Container{Int32}");
         }