Gestion de bibliothèque personnelle auto-hébergée : catalogue, prêts, scan de code-barres, consultation hors-ligne. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
18 lines
812 B
C#
18 lines
812 B
C#
using Microsoft.AspNetCore.Components.Web;
|
|
using Microsoft.AspNetCore.Components.WebAssembly.Hosting;
|
|
using MaBibli.Client;
|
|
|
|
var builder = WebAssemblyHostBuilder.CreateDefault(args);
|
|
builder.RootComponents.Add<App>("#app");
|
|
builder.RootComponents.Add<HeadOutlet>("head::after");
|
|
|
|
builder.Services.AddScoped(sp => new HttpClient { BaseAddress = new Uri(builder.HostEnvironment.BaseAddress) });
|
|
|
|
// Cache de consultation hors-ligne : un seul jeu d'instantanés pour toute l'application, d'où
|
|
// des services partagés (Scoped vaut Singleton dans un client WebAssembly).
|
|
builder.Services.AddScoped<MaBibli.Client.Services.CacheHorsLigne>();
|
|
builder.Services.AddScoped<MaBibli.Client.Services.EtatReseau>();
|
|
builder.Services.AddScoped<MaBibli.Client.Services.ServiceLivresApi>();
|
|
|
|
await builder.Build().RunAsync();
|