Catering for service registration of non-UI apps
continuous-integration/drone/pr Build is passing

This commit is contained in:
Khwezi Mngoma
2026-06-13 10:45:31 +02:00
parent 9b474a398b
commit 630e74814b
4 changed files with 38 additions and 37 deletions
@@ -1,11 +1,12 @@
using LiteCharms.Features.Abstractions;
using LiteCharms.Features.Browser;
using LiteCharms.Features.MidrandBooks.Abstractions;
namespace LiteCharms.Features.MidrandBooks.Extensions;
public static class Shop
{
public static IServiceCollection AddShopServices(this IServiceCollection services)
public static IServiceCollection AddShopServices(this IServiceCollection services, bool includeLocalStorage = false)
{
var serviceType = typeof(IService);
@@ -19,6 +20,9 @@ public static class Shop
foreach (var coreImplementation in coreImplementations) services.AddScoped(coreImplementation);
if (includeLocalStorage)
services.AddScoped<LocalStorageService>();
return services;
}
}