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
1 changed files with 15 additions and 0 deletions

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));
}
}
}