small tweaks

pull/3689/head
Jamie Rees 5 years ago
parent 0fa4005113
commit e3094d2df1

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

@ -155,24 +155,5 @@ namespace Ombi.Settings.Settings
return settings.Content; return settings.Content;
//return _protector.Unprotect(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);
}
} }
} }

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

@ -121,24 +121,5 @@ namespace Ombi.Store.Repository
return r; 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);
}
} }
} }
Loading…
Cancel
Save