diff Implab.Playground/Program.cs @ 269:ff581cff7003 v3

Working on Unity container xml configuration
author cin
date Tue, 24 Apr 2018 01:46:02 +0300
parents 0be8a6ae8307
children ade80d94dfb5
line wrap: on
line diff
--- a/Implab.Playground/Program.cs	Sun Apr 22 15:29:10 2018 +0300
+++ b/Implab.Playground/Program.cs	Tue Apr 24 01:46:02 2018 +0300
@@ -9,6 +9,11 @@
 namespace Implab.Playground {
 
     public class Foo {
+
+        public class Bar {
+
+        }
+
         public int IntValue { get; set; }
 
         public string StringValue { get; set; }
@@ -32,20 +37,10 @@
         static void Main(string[] args) {
             var container = new UnityContainer();
 
-            var listener = new SimpleTraceListener(Console.Out);
-            Trace<ConfigurationContext>.TraceSource.Switch.Level = SourceLevels.All;
-            Trace<ConfigurationContext>.TraceSource.Listeners.Add(listener);
-
-            var c = new Container<int>();
+            var conf = SerializationHelpers.DeserializeFromFile<ContainerElement>("data/sample.xml");
 
-            var cts = new ConfigurationContext();
-            cts.AddNamespace("System");
-            cts.AddNamespace("System.Collections.Generic");
-            cts.AddNamespace("Implab.Playground");
+            Console.WriteLine($"Registrations: {conf.Registrations.Count}");
 
-            Console.WriteLine(c.GetType().FullName);
-
-            cts.Resolve("Container{Int32}");
         }