예제 #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var factory = new DependencySetupFactory();
            var setup   = factory.CreateSetup(Configuration);

            setup.Run(services);

            services.AddControllersWithViews();
        }
예제 #2
0
        protected override void RegisterTypes(IContainerRegistry containerRegistry)
        {
            containerRegistry.RegisterForNavigation <ScriptUserControl>();
            containerRegistry.RegisterForNavigation <QuizUserControl>();

            var factory = new DependencySetupFactory();
            var setup   = factory.CreateSetup();

            setup.Run(containerRegistry);

            containerRegistry.Register <IScriptApplicationService, ScriptApplicationService>();
            containerRegistry.Register <IQuizApplicationService, QuizApplicationService>();
        }
예제 #3
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            var factory = new DependencySetupFactory();
            var setup   = factory.CreateSetup(Configuration);

            setup.Run(services);

            services.AddControllersWithViews();

            // In production, the React files will be served from this directory
            services.AddSpaStaticFiles(configuration =>
            {
                configuration.RootPath = "ClientApp/build";
            });
        }
예제 #4
0
        // This method gets called by the runtime. Use this method to add services to the container.
        // For more information on how to configure your application, visit https://go.microsoft.com/fwlink/?LinkID=398940
        public void ConfigureServices(IServiceCollection services)
        {
            var factory = new DependencySetupFactory();
            var setup   = factory.CreateSetup(Configuration);

            setup.Run(services);

            // services.AddDbContext<EcDbContext>(options =>
            //     options.UseSqlite(
            //         Configuration.GetConnectionString("DefaultConnection")));
            // services.AddDefaultIdentity<IdentityUser>(options => options.SignIn.RequireConfirmedAccount = true)
            //     .AddEntityFrameworkStores<EcDbContext>();
            services.AddRazorPages();
            services.AddServerSideBlazor();
            // services.AddScoped<AuthenticationStateProvider, RevalidatingIdentityAuthenticationStateProvider<IdentityUser>>();
            // services.AddSingleton<WeatherForecastService>();
        }