Files
Wino-Mail/Wino.Services/ServicesContainerSetup.cs

57 lines
2.7 KiB
C#
Raw Permalink Normal View History

2024-04-18 01:44:37 +02:00
using Microsoft.Extensions.DependencyInjection;
using Serilog.Core;
using Wino.Domain.Interfaces;
using Wino.Services.Authenticators;
using Wino.Services.Processors;
using Wino.Services.Services;
using Wino.Services.Threading;
2024-04-18 01:44:37 +02:00
namespace Wino.Services
2024-04-18 01:44:37 +02:00
{
public static class ServicesContainerSetup
2024-04-18 01:44:37 +02:00
{
public static void RegisterServices(this IServiceCollection services)
2024-04-18 01:44:37 +02:00
{
var loggerLevelSwitcher = new LoggingLevelSwitch();
services.AddSingleton(loggerLevelSwitcher);
services.AddSingleton<ILogInitializer, LogInitializer>();
services.AddSingleton<IApplicationConfiguration, ApplicationConfiguration>();
2024-04-18 01:44:37 +02:00
services.AddSingleton<ITranslationService, TranslationService>();
services.AddSingleton<IDatabaseService, DatabaseService>();
services.AddSingleton<IThreadingStrategyProvider, ThreadingStrategyProvider>();
services.AddSingleton<IMimeFileService, MimeFileService>();
services.AddTransient<ITokenService, TokenService>();
services.AddTransient<IProviderService, ProviderService>();
services.AddTransient<IFolderService, FolderService>();
services.AddTransient<IMailService, MailService>();
services.AddTransient<IAccountService, AccountService>();
services.AddTransient<IContactService, ContactService>();
services.AddTransient<ISignatureService, SignatureService>();
2024-04-18 01:44:37 +02:00
services.AddTransient<IWinoRequestDelegator, WinoRequestDelegator>();
services.AddTransient<IWinoRequestProcessor, WinoRequestProcessor>();
2024-04-18 01:44:37 +02:00
services.AddTransient<IAutoDiscoveryService, AutoDiscoveryService>();
services.AddTransient<IContextMenuItemService, ContextMenuItemService>();
services.AddTransient<IFontService, FontService>();
services.AddTransient<IUnsubscriptionService, UnsubscriptionService>();
services.AddTransient<IHtmlPreviewer, HtmlPreviewer>();
services.AddTransient<IOutlookAuthenticator, OutlookAuthenticator>();
services.AddTransient<IGmailAuthenticator, GmailAuthenticator>();
services.AddTransient<IAuthenticationProvider, AuthenticationProvider>();
2024-04-18 01:44:37 +02:00
services.AddTransient<IGmailChangeProcessor, GmailChangeProcessor>();
services.AddTransient<IImapChangeProcessor, ImapChangeProcessor>();
services.AddTransient<IOutlookChangeProcessor, OutlookChangeProcessor>();
services.AddTransient<IOutlookThreadingStrategy, OutlookThreadingStrategy>();
services.AddTransient<IGmailThreadingStrategy, GmailThreadingStrategy>();
services.AddTransient<IImapThreadStrategy, ImapThreadStrategy>();
2024-04-18 01:44:37 +02:00
}
}
}