1
0
mirror of https://github.com/Sonarr/Sonarr.git synced 2024-10-30 07:22:35 +01:00

RegisterTypes in Eloquera

This commit is contained in:
Mark McDowall 2013-02-05 22:40:51 -08:00 committed by kay.one
parent 7f0dc84b29
commit d5900fc9eb

View File

@ -3,6 +3,7 @@ using System.IO;
using System.Linq;
using Eloquera.Client;
using NzbDrone.Common;
using NzbDrone.Core.RootFolders;
namespace NzbDrone.Core.Datastore
{
@ -48,9 +49,23 @@ namespace NzbDrone.Core.Datastore
db.OpenDatabase(databaseName);
}
RegisterTypeRules();
RegisterTypes(db);
return new EloqueraDb(db);
}
private void RegisterTypeRules()
{
RootFolder rootFolder = null;
DB.TypeRules
.IgnoreProperty(() => rootFolder.FreeSpace)
.IgnoreProperty(() => rootFolder.UnmappedFolders);
}
private void RegisterTypes(DB db)
{
db.RegisterType(typeof(RootFolder));
}
}
}