Files
mabibli/MaBibli.Client/Program.cs
T
Mathieu LimonierandClaude Opus 5 6a6d745af4 MaBibli 1.0.0
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>
2026-08-22 22:36:16 +02:00

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();