1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-26 12:55:17 +01:00
This commit is contained in:
Kyle Spearrin 2019-09-18 09:47:25 -04:00
parent 3af2fbd4e9
commit 1495f6e507
4 changed files with 7 additions and 7 deletions

View File

@ -3,7 +3,7 @@ using System.Threading.Tasks;
namespace Bit.Core.Repositories namespace Bit.Core.Repositories
{ {
public interface IMetaDataRespository public interface IMetaDataRepository
{ {
Task DeleteAsync(string objectName, string id); Task DeleteAsync(string objectName, string id);
Task<IDictionary<string, string>> GetAsync(string objectName, string id); Task<IDictionary<string, string>> GetAsync(string objectName, string id);

View File

@ -3,7 +3,7 @@ using System.Threading.Tasks;
namespace Bit.Core.Repositories.Noop namespace Bit.Core.Repositories.Noop
{ {
public class MetaDataRepository : IMetaDataRespository public class MetaDataRepository : IMetaDataRepository
{ {
public Task DeleteAsync(string objectName, string id) public Task DeleteAsync(string objectName, string id)
{ {

View File

@ -8,15 +8,15 @@ using Microsoft.WindowsAzure.Storage.Table;
namespace Bit.Core.Repositories.TableStorage namespace Bit.Core.Repositories.TableStorage
{ {
public class MetaDataRespository : IMetaDataRespository public class MetaDataRepository : IMetaDataRepository
{ {
private readonly CloudTable _table; private readonly CloudTable _table;
public MetaDataRespository(GlobalSettings globalSettings) public MetaDataRepository(GlobalSettings globalSettings)
: this(globalSettings.Events.ConnectionString) : this(globalSettings.Events.ConnectionString)
{ } { }
public MetaDataRespository(string storageConnectionString) public MetaDataRepository(string storageConnectionString)
{ {
var storageAccount = CloudStorageAccount.Parse(storageConnectionString); var storageAccount = CloudStorageAccount.Parse(storageConnectionString);
var tableClient = storageAccount.CreateCloudTableClient(); var tableClient = storageAccount.CreateCloudTableClient();

View File

@ -65,13 +65,13 @@ namespace Bit.Core.Utilities
{ {
services.AddSingleton<IEventRepository, SqlServerRepos.EventRepository>(); services.AddSingleton<IEventRepository, SqlServerRepos.EventRepository>();
services.AddSingleton<IInstallationDeviceRepository, NoopRepos.InstallationDeviceRepository>(); services.AddSingleton<IInstallationDeviceRepository, NoopRepos.InstallationDeviceRepository>();
services.AddSingleton<IMetaDataRespository, NoopRepos.MetaDataRepository>(); services.AddSingleton<IMetaDataRepository, NoopRepos.MetaDataRepository>();
} }
else else
{ {
services.AddSingleton<IEventRepository, TableStorageRepos.EventRepository>(); services.AddSingleton<IEventRepository, TableStorageRepos.EventRepository>();
services.AddSingleton<IInstallationDeviceRepository, TableStorageRepos.InstallationDeviceRepository>(); services.AddSingleton<IInstallationDeviceRepository, TableStorageRepos.InstallationDeviceRepository>();
services.AddSingleton<IMetaDataRespository, TableStorageRepos.MetaDataRespository>(); services.AddSingleton<IMetaDataRepository, TableStorageRepos.MetaDataRepository>();
} }
} }