< Summary

Information
Class: OzonOrdersWeb.Extensions.CacheExtensions
Assembly: OzonOrdersWeb
File(s): /home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Extensions/CacheExtensions.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 16
Coverable lines: 16
Total lines: 37
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
AddCacheServices(...)100%210%

File(s)

/home/runner/work/Studio2Prod/Studio2Prod/OzonOrdersWeb/Extensions/CacheExtensions.cs

#LineLine coverage
 1using OzonDomains.Models;
 2using Services.CacheServices.Cache.CartCache;
 3using Services.CacheServices.Cache.OrderSummaryCache;
 4using Services.CacheServices.Cache.OzonOrdersCache;
 5using Services.CacheServices.Cache.UniqueValuesCache;
 6using Services.CacheServices.Cache.UserCacheService;
 7using Services.CacheServices.Cache;
 8using Services.CacheServices.Cache.EtProducerCache;
 9
 10namespace OzonOrdersWeb.Extensions;
 11
 12public static class CacheExtensions
 13{
 14    public static void AddCacheServices(this IServiceCollection services)
 15    {
 016        services.AddMemoryCache();
 017        services.AddDistributedMemoryCache();
 018        services.AddSession();
 19
 020        services.AddSingleton<AppCache>();
 021        services.AddScoped<OrderCache>();
 022        services.AddScoped<EtProducerCache>();
 023        services.AddScoped<ProductCache>();
 024        services.AddScoped<TransactionCache>();
 25
 026        services.AddScoped<CacheUpdater<Product>>();
 027        services.AddScoped<CacheUpdater<Order>>();
 028        services.AddScoped<CacheUpdater<Transaction>>();
 29
 030        services.AddScoped<IUniqueValuesCache, UniqueValuesCache>();
 031        services.AddScoped<IUserCacheService, UserCacheService>();
 32
 033        services.AddScoped<CartCache>();
 34
 035        services.AddSingleton<IOrderSummaryCache, OrderSummaryCache>();
 036    }
 37}