Program.cs
48 lines
| 922 B
| text/x-csharp
|
CSharpLexer
/ Implab.Playground / Program.cs
cin
|
r267 | using System; | ||
cin
|
r268 | using System.Diagnostics; | ||
using Implab.Diagnostics; | ||||
cin
|
r267 | using Implab.ServiceHost.Unity; | ||
cin
|
r229 | using Implab.Xml; | ||
cin
|
r267 | using Unity; | ||
using Unity.Injection; | ||||
cin
|
r229 | |||
namespace Implab.Playground { | ||||
cin
|
r267 | |||
public class Foo { | ||||
cin
|
r269 | |||
public class Bar { | ||||
} | ||||
cin
|
r267 | 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; } | ||||
} | ||||
cin
|
r255 | |||
cin
|
r229 | public class Program { | ||
cin
|
r255 | static void Main(string[] args) { | ||
cin
|
r267 | var container = new UnityContainer(); | ||
cin
|
r255 | |||
cin
|
r269 | var conf = SerializationHelpers.DeserializeFromFile<ContainerElement>("data/sample.xml"); | ||
cin
|
r233 | |||
cin
|
r269 | Console.WriteLine($"Registrations: {conf.Registrations.Count}"); | ||
cin
|
r268 | |||
cin
|
r233 | } | ||
cin
|
r229 | |||
} | ||||
} | ||||