< Summary

Information
Class: MRA.DependencyInjection.Startup.InfrastructureStartup
Assembly: MRA.DependencyInjection
File(s): D:\a\MiguelRomerART\MiguelRomerART\MRA.DependencyInjection\Startup\InfrastructureStartup.cs
Line coverage
100%
Covered lines: 9
Uncovered lines: 0
Coverable lines: 9
Total lines: 30
Line coverage: 100%
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
AddCustomInfrastructure(...)100%11100%

File(s)

D:\a\MiguelRomerART\MiguelRomerART\MRA.DependencyInjection\Startup\InfrastructureStartup.cs

#LineLine coverage
 1using Microsoft.Extensions.DependencyInjection;
 2using MRA.Infrastructure.Database.Providers;
 3using MRA.Infrastructure.Storage;
 4using MRA.Infrastructure.Excel;
 5using MRA.Infrastructure.RemoteConfig;
 6using MRA.Infrastructure.Cache;
 7using Microsoft.Extensions.Caching.Memory;
 8using MRA.Infrastructure.Database.Providers.Interfaces;
 9using MRA.Infrastructure.Storage.Connection;
 10using MRA.Infrastructure.UserInput;
 11
 12namespace MRA.DependencyInjection.Startup;
 13
 14public static class InfrastructureStartup
 15{
 16    public static void AddCustomInfrastructure(this IServiceCollection services)
 17    {
 118        services.AddSingleton<IDocumentsDatabase, MongoDbDatabase>();
 19
 120        services.AddSingleton<IAzureStorageConnection, AzureStorageConnection>();
 121        services.AddSingleton<IStorageProvider, AzureStorageProvider>();
 22
 123        services.AddSingleton<IUserInputProvider, ConsoleProvider>();
 124        services.AddSingleton<IExcelProvider, EPPlusExcelProvider>();
 125        services.AddSingleton<IRemoteConfigDatabase, AzureAppConfigurationDatabase>();
 26
 127        services.AddSingleton<IMemoryCache>(new MemoryCache(new MemoryCacheOptions()));
 128        services.AddSingleton<ICacheProvider, MicrosoftCacheProvider>();
 129    }
 30}