Beispiel #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();
        }
Beispiel #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>();
        }
Beispiel #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";
            });
        }
Beispiel #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>();
        }