Ejemplo n.º 1
0
        private void ConfigureWebAssemblyHost(ServiceCollection aServiceCollection)
        {
            //var webAssemblyHostBuilder = WebAssemblyHostBuilder.CreateDefault();
            //ConfigureServices(webAssemblyHostBuilder.Services);

            //WebAssemblyHost webAssemblyHost = webAssemblyHostBuilder.Build();
            //aServiceCollection.AddSingleton(webAssemblyHost);

            var clientHostBuilder = ClientHostBuilder.CreateDefault();

            ConfigureServices(clientHostBuilder.Services);

            ClientHost clientHost = clientHostBuilder.Build();

            aServiceCollection.AddSingleton(clientHost);
        }