-
-
Save explorer14/68cf857b51556a9dae9ce649cde003b5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Program | |
{ | |
public static async Task Main(string[] args) | |
{ | |
var builder = WebAssemblyHostBuilder.CreateDefault(args); | |
builder.RootComponents.Add<App>("app"); | |
// other stuff | |
ConfigureServices(builder.Services); | |
await builder.Build().RunAsync(); | |
} | |
public static void ConfigureServices(IServiceCollection services) | |
{ | |
services.AddScoped(serviceProvider => | |
{ | |
return TraxpenseApiClientFactory.CreateClient( | |
new BrowserAuthTokenRepository( | |
serviceProvider.GetService<IJSRuntime>())); | |
}); | |
//...other services | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment