Replace Ninject with Simple Injector

后端 未结 1 382
有刺的猬
有刺的猬 2020-12-30 16:03

I\'ve used Ninject for my application. Ninject is really simple and easy to learn, but its quite slow and I try to use another IoC to compare if its faster as with Ninject.<

相关标签:
1条回答
  • 2020-12-30 16:24

    This Ninject registration roughly translates to the following Simple Injector registration:

    container.Register<ITypeMapFactory, TypeMapFactory>();
    container.RegisterCollection<IObjectMapper>(MapperRegistry.AllMappers());
    container.RegisterSingleton<IConfiguration, ConfigurationStore>();
    container.RegisterSingleton<IConfigurationProvider, ConfigurationStore>();
    container.Register<IMappingEngine, MappingEngine>();
    
    0 讨论(0)
提交回复
热议问题