small tweaks

This commit is contained in:
Jamie Rees 2020-07-21 08:01:08 +01:00
commit e3094d2df1
4 changed files with 2 additions and 40 deletions

View file

@ -3,7 +3,7 @@ using System.Threading.Tasks;
namespace Ombi.Core.Settings
{
public interface ISettingsService<T> : IDisposable
public interface ISettingsService<T>
{
T GetSettings();
Task<T> GetSettingsAsync();

View file

@ -155,24 +155,5 @@ namespace Ombi.Settings.Settings
return settings.Content;
//return _protector.Unprotect(settings.Content);
}
private bool _disposed;
protected virtual void Dispose(bool disposing)
{
if (_disposed)
return;
if (disposing)
{
Repo?.Dispose();
}
_disposed = true;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
}
}

View file

@ -5,7 +5,7 @@ using Ombi.Store.Entities;
namespace Ombi.Store.Repository
{
public interface ISettingsRepository : IDisposable
public interface ISettingsRepository
{
/// <summary>
/// Inserts the specified entity.

View file

@ -121,24 +121,5 @@ namespace Ombi.Store.Repository
return r;
}
}
private bool _disposed;
protected virtual void Dispose(bool disposing)
{
if (_disposed)
return;
if (disposing)
{
Db?.Dispose();
}
_disposed = true;
}
public void Dispose()
{
Dispose(true);
GC.SuppressFinalize(this);
}
}
}