示例#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;
 }