mirror of
https://github.com/Readarr/Readarr.git
synced 2026-04-22 22:14:44 -04:00
Changed the way the Database is registered with TinyIoC to make Logdb and future cachedb more accessible.
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using Marr.Data;
|
||||
|
||||
namespace NzbDrone.Core.Datastore
|
||||
{
|
||||
public interface IMainDatabase : IDatabase
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class MainDatabase : IMainDatabase
|
||||
{
|
||||
private readonly IDatabase _database;
|
||||
|
||||
public MainDatabase(IDatabase database)
|
||||
{
|
||||
_database = database;
|
||||
}
|
||||
|
||||
public IDataMapper GetDataMapper()
|
||||
{
|
||||
return _database.GetDataMapper();
|
||||
}
|
||||
|
||||
public Version Version
|
||||
{
|
||||
get { return _database.Version; }
|
||||
}
|
||||
|
||||
public void Vacuum()
|
||||
{
|
||||
_database.Vacuum();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user