Ejemplo n.º 1
0
        public Startup(IConfiguration configuration, IWebHostEnvironment environment)
        {
            Ensure.NotNull(configuration, "configuration");
            Ensure.NotNull(environment, "environment");
            this.configuration = configuration;
            this.environment   = environment;

            accountsStartup = new AccountsStartup(configuration.GetSection("Accounts"), ResolvePath);
            entriesStartup  = new EntriesStartup(configuration.GetSection("Entries"), ResolvePath);
            sharingStartup  = new SharingStartup();
        }
Ejemplo n.º 2
0
        public async static Task Main(string[] args)
        {
            // Startups
            common   = new CommonStartup();
            accounts = new AccountsStartup();
            entries  = new EntriesStartup();
            sharing  = new SharingStartup();

            // Configure.
            WebAssemblyHostBuilder builder = WebAssemblyHostBuilder.CreateDefault();

            ConfigureServices(builder.Services);
            ConfigureComponents(builder.RootComponents);

            // Startup.
            WebAssemblyHost host = builder.Build();

            StartupServices(host.Services);

            // Run.
            await host.RunAsync();
        }