예제 #1
0
        public void RegisterFactory <TInterface, TClass>(Func <IContainer, TClass> factory) where TClass : TInterface
        {
            IInjectionFactory <TClass> objectFactory = new InjectionFactory <TClass>(factory);

            _factories.Add(typeof(TInterface), objectFactory);
        }
예제 #2
0
        public void RegisterFactory <TClass>(Func <IContainer, TClass> factory)
        {
            IInjectionFactory <TClass> objectFactory = new InjectionFactory <TClass>(factory);

            _factories.Add(typeof(TClass), objectFactory);
        }