1
0
mirror of https://github.com/bitwarden/mobile.git synced 2024-11-26 12:16:07 +01:00

setup new settings service

This commit is contained in:
Kyle Spearrin 2017-02-08 20:44:35 -05:00
parent 3ad1e8a3ba
commit 0cd09cf03a
6 changed files with 30 additions and 1 deletions

View File

@ -211,6 +211,7 @@ namespace Bit.Android
.RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager()) .RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager())
.RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager()) .RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager())
.RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager()) .RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager())
.RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
// Repositories // Repositories
.RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
.RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())

View File

@ -0,0 +1,6 @@
namespace Bit.App.Abstractions
{
public interface ISettingsService
{
}
}

View File

@ -38,6 +38,7 @@
<Compile Include="Abstractions\Repositories\IAccountsApiRepository.cs" /> <Compile Include="Abstractions\Repositories\IAccountsApiRepository.cs" />
<Compile Include="Abstractions\Repositories\IDeviceApiRepository.cs" /> <Compile Include="Abstractions\Repositories\IDeviceApiRepository.cs" />
<Compile Include="Abstractions\Repositories\ISettingsRepository.cs" /> <Compile Include="Abstractions\Repositories\ISettingsRepository.cs" />
<Compile Include="Abstractions\Services\ISettingsService.cs" />
<Compile Include="Abstractions\Services\ITokenService.cs" /> <Compile Include="Abstractions\Services\ITokenService.cs" />
<Compile Include="Abstractions\Services\IHttpService.cs" /> <Compile Include="Abstractions\Services\IHttpService.cs" />
<Compile Include="Abstractions\Services\IDeviceInfoService.cs" /> <Compile Include="Abstractions\Services\IDeviceInfoService.cs" />
@ -183,6 +184,7 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<DependentUpon>AppResources.zh-Hans.resx</DependentUpon> <DependentUpon>AppResources.zh-Hans.resx</DependentUpon>
</Compile> </Compile>
<Compile Include="Services\SettingsService.cs" />
<Compile Include="Services\TokenService.cs" /> <Compile Include="Services\TokenService.cs" />
<Compile Include="Services\AppIdService.cs" /> <Compile Include="Services\AppIdService.cs" />
<Compile Include="Abstractions\Services\ILockService.cs" /> <Compile Include="Abstractions\Services\ILockService.cs" />

View File

@ -0,0 +1,19 @@
using Bit.App.Abstractions;
using Plugin.Settings.Abstractions;
namespace Bit.App.Services
{
public class SettingsService : ISettingsService
{
private readonly ISettingsRepository _settingsRepository;
private readonly ISettings _settings;
public SettingsService(
ISettingsRepository settingsRepository,
ISettings settings)
{
_settingsRepository = settingsRepository;
_settings = settings;
}
}
}

View File

@ -281,6 +281,7 @@ namespace Bit.iOS.Extension
.RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager()) .RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager())
.RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager()) .RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager())
.RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager()) .RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager())
.RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
// Repositories // Repositories
.RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
.RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())

View File

@ -266,7 +266,7 @@ namespace Bit.iOS
.RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager()) .RegisterType<ILogService, LogService>(new ContainerControlledLifetimeManager())
.RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager()) .RegisterType<IHttpService, HttpService>(new ContainerControlledLifetimeManager())
.RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager()) .RegisterType<ITokenService, TokenService>(new ContainerControlledLifetimeManager())
// Repositories .RegisterType<ISettingsService, SettingsService>(new ContainerControlledLifetimeManager())
// Repositories // Repositories
.RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderRepository, FolderRepository>(new ContainerControlledLifetimeManager())
.RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager()) .RegisterType<IFolderApiRepository, FolderApiRepository>(new ContainerControlledLifetimeManager())