Пример #1
0
        public void TestInitialize()
        {
            this.target = new Container();

            this.target.AddRegistrationEntry(typeof(TestClassA), new RegistrationEntry(typeof(TestClassA), new ContainerLifetime()));
            this.target.AddRegistrationEntry(typeof(TestClassB), new RegistrationEntry(typeof(TestClassB)));
            this.target.AddRegistrationEntry(typeof(TestClassC), new RegistrationEntry(typeof(TestClassC)));
            this.target.AddRegistrationEntry(typeof(TestClassD), new RegistrationEntry(typeof(TestClassD), new PerResolveLifetime()));
            this.target.AddRegistrationEntry(typeof(ITestClassC), new RegistrationEntry(typeof(TestClassC)));
        }
Пример #2
0
 public TestClassA(Container container)
 {
     this.Container = container;
 }
Пример #3
0
 public Container CreateChildContainer()
 {
     Container childContainer = new Container();
     childContainer.repository = this.repository;
     return childContainer;
 }