public MiCakeServiceRegistrar_Tests() { MiCakeModules = BuildCurrentModule(); Services = BuildServiceCollection(); DefaultServiceRegistrar defaultServiceRegistrar = new DefaultServiceRegistrar(Services); defaultServiceRegistrar.Register(MiCakeModules); }
//Inject service into container according to matching rules private void AutoRegisterServices(ModuleConfigServiceContext context) { var serviceRegistrar = new DefaultServiceRegistrar(context.Services); if (ApplicationOptions.FindAutoServiceTypes != null) { serviceRegistrar.SetServiceTypesFinder(ApplicationOptions.FindAutoServiceTypes); } serviceRegistrar.Register(context.MiCakeModules); }