##// END OF EJS Templates
Working on Unity xml configuration
Working on Unity xml configuration

File last commit:

r267:6b3e5c48131b v3
r267:6b3e5c48131b v3
Show More
Program.cs
40 lines | 839 B | text/x-csharp | CSharpLexer
using System;
using Implab.ServiceHost.Unity;
using Implab.Xml;
using Unity;
using Unity.Injection;
namespace Implab.Playground {
public class Foo {
public int IntValue { get; set; }
public string StringValue { get; set; }
}
public class Container<T> {
public Container() {
}
public Container(T instance) {
Instance = instance;
}
public T Instance { get; set; }
}
public class Program {
static void Main(string[] args) {
var container = new UnityContainer();
var containerConfig = SerializationHelpers.DeserializeFromFile<ContainerElement>("data/sample.xml");
Console.WriteLine($"container: {containerConfig.Registrations.Count}");
}
}
}