Cleaning up the solution. Separating Shared.WinRT, Services and Synchronization. Removing synchronization from app. Reducing bundle size by 45mb.

This commit is contained in:
Burak Kaan Köse
2024-07-21 05:45:02 +02:00
parent f112f369a7
commit 495885e006
523 changed files with 2254 additions and 2375 deletions

View File

@@ -0,0 +1,38 @@
using System;
using Wino.Domain;
using Wino.Domain.Enums;
using Wino.Domain.Interfaces;
using IAuthenticationProvider = Wino.Domain.Interfaces.IAuthenticationProvider;
namespace Wino.Services.Services
{
public class AuthenticationProvider : IAuthenticationProvider
{
private readonly INativeAppService _nativeAppService;
private readonly ITokenService _tokenService;
private readonly IOutlookAuthenticator _outlookAuthenticator;
private readonly IGmailAuthenticator _gmailAuthenticator;
public AuthenticationProvider(INativeAppService nativeAppService,
ITokenService tokenService,
IOutlookAuthenticator outlookAuthenticator,
IGmailAuthenticator gmailAuthenticator)
{
_nativeAppService = nativeAppService;
_tokenService = tokenService;
_outlookAuthenticator = outlookAuthenticator;
_gmailAuthenticator = gmailAuthenticator;
}
public IAuthenticator GetAuthenticator(MailProviderType providerType)
{
return providerType switch
{
MailProviderType.Outlook => _outlookAuthenticator,
MailProviderType.Office365 => _outlookAuthenticator,
MailProviderType.Gmail => _gmailAuthenticator,
_ => throw new ArgumentException(Translator.Exception_UnsupportedProvider),
};
}
}
}