private static IServiceCollection AddApplication(this IServiceCollection services, Type type)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }

            var obj = new ObjectAccessor <IApplicationBuilder>();

            services.AddObjectAccessor(obj);


            IStartupModuleRunner runner = new StartupModuleRunner(type, services);

            runner.ConfigureServices(services);

            return(services);
        }
Ejemplo n.º 2
0
        private static IServiceCollection AddApplication(this IServiceCollection services, Type type)
        {
            if (services == null)
            {
                throw new ArgumentNullException(nameof(services));
            }



            var obj = new Objects <IApplicationBuilder>();

            services.Add(ServiceDescriptor.Singleton(typeof(Objects <IApplicationBuilder>), obj));
            services.Add(ServiceDescriptor.Singleton(typeof(IObjects <IApplicationBuilder>), obj));

            IStartupModuleRunner runner = new StartupModuleRunner(type, services);

            runner.ConfigureServices(services);

            return(services);
        }