Example #1
0
        // This method gets called by the runtime. Use this method to add services to the container.
        public void ConfigureServices(IServiceCollection services)
        {
            services.AddControllers();
            var commonStartup = new CommonStartup();

            commonStartup.ConfigureServices(services);
        }
        public void ConfigureServices(IServiceCollection services)
        {
            CommonStartup.ConfigureServices(services, Configuration);

            services.AddWebAssemblyPrerenderingNoopAuthentication();

            services.AddControllersWithViews();
            services.AddRazorPages();
        }
Example #3
0
        public static async Task Main(string[] args)
        {
            // Need to force assembly loading (https://github.com/dotnet/aspnetcore/issues/26601)
            typeof(App).ToString();

            var builder = WebAssemblyHostBuilder.CreateDefault(args);

            builder.RootComponents.Add <App>("app");

            builder.Services.AddAuth0Authentication(options =>
            {
                builder.Configuration.Bind("Oidc", options.ProviderOptions);
            });

            CommonStartup.ConfigureServices(builder.Services, builder.Configuration);

            await builder.Build().RunAsync();
        }
Example #4
0
        private static void ConfigureServices(IServiceCollection services)
        {
            DefaultEventManager eventManager = new DefaultEventManager();

            services
            .AddLogging()
            .AddExceptions()
            .AddComponents()
            .AddUiOptions()
            .AddHttpClientFactory(GetApiBaseUrl())
            .AddSingleton <IEventDispatcher>(eventManager)
            .AddSingleton <IEventHandlerCollection>(eventManager)
            .AddSingleton <Json>()
            .AddTransient <Navigator>();

            ConfigureConverts();

            common.ConfigureServices(services);
            accounts.ConfigureServices(services);
            entries.ConfigureServices(services);
            sharing.ConfigureServices(services);
        }
 public void ConfigureServices(IServiceCollection services)
 {
     CommonStartup.ConfigureServices(services, Configuration);
 }