コード例 #1
0
        public MiCakeServiceRegistrar_Tests()
        {
            MiCakeModules = BuildCurrentModule();
            Services      = BuildServiceCollection();

            DefaultServiceRegistrar defaultServiceRegistrar = new DefaultServiceRegistrar(Services);

            defaultServiceRegistrar.Register(MiCakeModules);
        }
コード例 #2
0
ファイル: MiCakeApplication.cs プロジェクト: nodyang/MiCake
        //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);
        }