Example #1
0
        private T GetInstance <T>()
        {
            _deployer.Deploy();
            var component = _manager.GetComponent(typeof(T));

            return((T)_manager.GetReference(component, _manager.CreateCreationalContext(component)));
        }
        public void FieldCircularDependencyShouldBeAllowed()
        {
            _deployer.AddTypes(typeof(One), typeof(Two));
            _deployer.Deploy();

            var component = _manager.GetComponent(typeof(One));
            var instance  = (One)_manager.GetReference(component, _manager.CreateCreationalContext(component));

            Assert.AreEqual(instance, instance.two.one);
        }