Exemplo n.º 1
0
        public IRegistrationContainer RegisterFactory <TAbstract>(Func <IResolutionContainer, TAbstract> factoryFunc,
                                                                  RegistrationLifeTime registrationLifeTime = RegistrationLifeTime.Transient, string key = null, bool shouldReplace = false) where TAbstract : class

        {
            SimpleInjectorIocResolverAdapter c = SimpleInjectorIocResolverAdapter.Adapt(_container);

            _container.Register <TAbstract>(() => factoryFunc(c), registrationLifeTime.ToContainerLifeTime());
            return(this);
        }
 protected override IResolutionContainer AdaptResolver(Container container)
 {
     return(SimpleInjectorIocResolverAdapter.Adapt(container));
 }