Esempio n. 1
0
        public void PrepareBasic()
        {
            container = ObjectResolver.Create();

            RegisterBasic(container);

            container.Compile();
        }
Esempio n. 2
0
        public void Setup()
        {
            _container = ObjectResolver.Create();

            MicroResolverRelated.Bind(_container);

            _container.Compile();

            MicroResolverRelated.ResolveGeneric(_container);
            MicroResolverRelated.ResolveNonGeneric(_container);
        }
Esempio n. 3
0
        public void Prepare()
        {
            container = ObjectResolver.Create();


            RegisterBasic(container);
            RegisterPropertyInjection(container);
            RegisterMultiple(container);

            container.Compile();
        }
Esempio n. 4
0
        public void Setup()
        {
            _kernel = ObjectResolver.Create();

            _kernel.Register <IA, A>(Lifestyle.Transient);
            _kernel.Register <IB, B>(Lifestyle.Transient);
            _kernel.Register <IC, C>(Lifestyle.Transient);

            _kernel.Compile();

            _kernel.Resolve <IA>();
            _kernel.Resolve <IB>();
            _kernel.Resolve <IC>();
        }
Esempio n. 5
0
        public void Setup()
        {
            _kernel = ObjectResolver.Create();

            _kernel.Register <IA, A>(Lifestyle.Singleton);
            _kernel.Register <IB, B>(Lifestyle.Singleton);
            _kernel.Register <IC, C>(Lifestyle.Singleton);

            _kernel.Compile();

            _kernel.Resolve(typeof(IA));
            _kernel.Resolve(typeof(IB));
            _kernel.Resolve(typeof(IC));
        }
Esempio n. 6
0
        public IContainer <TState> Build()
        {
            if (_alreadyBuilt)
            {
                throw new InvalidOperationException("Container is already built");
            }
            _resolver.Compile();
            foreach (var type in _registeredTypes)
            {
                _resolver.Resolve(type);
            }
            BuildExecutionOrder();
            _alreadyBuilt = true;
            ContainerProvider <TState> .EndCreation();

            return(this);
        }