1
0
mirror of https://github.com/bitwarden/server.git synced 2024-11-22 12:15:36 +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
{
public interface IMetaDataRespository
public interface IMetaDataRepository
{
Task DeleteAsync(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
{
public class MetaDataRepository : IMetaDataRespository
public class MetaDataRepository : IMetaDataRepository
{
public Task DeleteAsync(string objectName, string id)
{

View File

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

View File

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