2017-09-04 02:20:56 +00:00
|
|
|
using System;
|
2013-03-31 23:40:19 +00:00
|
|
|
using System.Collections.Generic;
|
2018-12-15 00:02:43 +00:00
|
|
|
using System.Linq;
|
2013-03-25 06:13:53 +00:00
|
|
|
using Marr.Data;
|
|
|
|
using Marr.Data.Mapping;
|
2013-09-21 06:39:26 +00:00
|
|
|
using NzbDrone.Common.Reflection;
|
2013-10-23 06:36:31 +00:00
|
|
|
using NzbDrone.Core.Blacklisting;
|
2013-03-25 06:13:53 +00:00
|
|
|
using NzbDrone.Core.Configuration;
|
|
|
|
using NzbDrone.Core.Datastore.Converters;
|
2014-04-10 22:19:40 +00:00
|
|
|
using NzbDrone.Core.Datastore.Extensions;
|
2014-02-14 05:31:49 +00:00
|
|
|
using NzbDrone.Core.Download;
|
2014-06-08 08:22:55 +00:00
|
|
|
using NzbDrone.Core.Download.Pending;
|
2013-03-25 06:13:53 +00:00
|
|
|
using NzbDrone.Core.Indexers;
|
2018-02-06 23:08:36 +00:00
|
|
|
using NzbDrone.Core.ImportLists;
|
2013-03-25 06:13:53 +00:00
|
|
|
using NzbDrone.Core.Instrumentation;
|
|
|
|
using NzbDrone.Core.Jobs;
|
|
|
|
using NzbDrone.Core.MediaFiles;
|
2014-11-24 00:07:46 +00:00
|
|
|
using NzbDrone.Core.Profiles.Delay;
|
2014-09-11 20:24:00 +00:00
|
|
|
using NzbDrone.Core.RemotePathMappings;
|
2013-05-19 23:17:32 +00:00
|
|
|
using NzbDrone.Core.Notifications;
|
2013-04-25 04:27:49 +00:00
|
|
|
using NzbDrone.Core.Organizer;
|
2014-06-08 08:22:55 +00:00
|
|
|
using NzbDrone.Core.Parser.Model;
|
2017-11-26 03:51:37 +00:00
|
|
|
using NzbDrone.Core.Profiles.Languages;
|
|
|
|
using NzbDrone.Core.Profiles.Metadata;
|
2017-09-04 02:20:56 +00:00
|
|
|
using NzbDrone.Core.Profiles.Qualities;
|
2013-03-25 06:13:53 +00:00
|
|
|
using NzbDrone.Core.Qualities;
|
|
|
|
using NzbDrone.Core.RootFolders;
|
2017-06-25 13:17:49 +00:00
|
|
|
using NzbDrone.Core.ArtistStats;
|
2014-09-10 00:02:55 +00:00
|
|
|
using NzbDrone.Core.Tags;
|
2013-09-21 06:39:26 +00:00
|
|
|
using NzbDrone.Core.ThingiProvider;
|
2014-10-12 22:00:03 +00:00
|
|
|
using NzbDrone.Common.Disk;
|
2017-11-26 03:51:37 +00:00
|
|
|
using NzbDrone.Common.Serializer;
|
2015-01-26 02:03:21 +00:00
|
|
|
using NzbDrone.Core.Authentication;
|
2018-09-23 03:10:50 +00:00
|
|
|
using NzbDrone.Core.CustomFilters;
|
2015-12-25 09:22:00 +00:00
|
|
|
using NzbDrone.Core.Extras.Metadata;
|
|
|
|
using NzbDrone.Core.Extras.Metadata.Files;
|
|
|
|
using NzbDrone.Core.Extras.Others;
|
2017-10-25 01:25:29 +00:00
|
|
|
using NzbDrone.Core.Extras.Lyrics;
|
2015-01-16 00:30:09 +00:00
|
|
|
using NzbDrone.Core.Messaging.Commands;
|
2017-04-20 23:19:47 +00:00
|
|
|
using NzbDrone.Core.Music;
|
2017-09-04 02:20:56 +00:00
|
|
|
using NzbDrone.Core.Languages;
|
2019-02-16 14:49:24 +00:00
|
|
|
using Marr.Data.QGen;
|
2019-02-23 22:39:11 +00:00
|
|
|
using NzbDrone.Core.Profiles.Releases;
|
2013-03-25 06:13:53 +00:00
|
|
|
|
|
|
|
namespace NzbDrone.Core.Datastore
|
|
|
|
{
|
|
|
|
public static class TableMapping
|
|
|
|
{
|
|
|
|
private static readonly FluentMappings Mapper = new FluentMappings(true);
|
|
|
|
|
|
|
|
public static void Map()
|
|
|
|
{
|
|
|
|
RegisterMappers();
|
|
|
|
|
|
|
|
Mapper.Entity<Config>().RegisterModel("Config");
|
2018-02-10 04:25:28 +00:00
|
|
|
|
|
|
|
Mapper.Entity<RootFolder>().RegisterModel("RootFolders")
|
|
|
|
.Ignore(r => r.FreeSpace)
|
|
|
|
.Ignore(r => r.TotalSpace);
|
|
|
|
|
2015-04-25 16:02:17 +00:00
|
|
|
Mapper.Entity<ScheduledTask>().RegisterModel("ScheduledTasks");
|
2013-03-25 06:13:53 +00:00
|
|
|
|
2015-04-25 16:02:17 +00:00
|
|
|
Mapper.Entity<IndexerDefinition>().RegisterDefinition("Indexers")
|
2014-08-18 02:25:00 +00:00
|
|
|
.Ignore(i => i.Enable)
|
|
|
|
.Ignore(i => i.Protocol)
|
|
|
|
.Ignore(i => i.SupportsRss)
|
2017-09-04 02:20:56 +00:00
|
|
|
.Ignore(i => i.SupportsSearch)
|
|
|
|
.Ignore(d => d.Tags);
|
2014-08-18 02:25:00 +00:00
|
|
|
|
2018-02-06 23:08:36 +00:00
|
|
|
Mapper.Entity<ImportListDefinition>().RegisterDefinition("ImportLists")
|
2018-10-09 00:56:05 +00:00
|
|
|
.Ignore(i => i.Enable);
|
2018-02-06 23:08:36 +00:00
|
|
|
|
2015-05-20 23:22:10 +00:00
|
|
|
Mapper.Entity<NotificationDefinition>().RegisterDefinition("Notifications")
|
|
|
|
.Ignore(i => i.SupportsOnGrab)
|
|
|
|
.Ignore(i => i.SupportsOnDownload)
|
2018-04-04 03:45:59 +00:00
|
|
|
.Ignore(i => i.SupportsOnAlbumDownload)
|
2015-05-20 23:22:10 +00:00
|
|
|
.Ignore(i => i.SupportsOnUpgrade)
|
|
|
|
.Ignore(i => i.SupportsOnRename);
|
|
|
|
|
2017-09-04 02:20:56 +00:00
|
|
|
Mapper.Entity<MetadataDefinition>().RegisterDefinition("Metadata")
|
|
|
|
.Ignore(d => d.Tags);
|
2014-08-18 02:25:00 +00:00
|
|
|
|
2015-04-25 16:02:17 +00:00
|
|
|
Mapper.Entity<DownloadClientDefinition>().RegisterDefinition("DownloadClients")
|
2017-09-04 02:20:56 +00:00
|
|
|
.Ignore(d => d.Protocol)
|
|
|
|
.Ignore(d => d.Tags);
|
2013-03-25 06:13:53 +00:00
|
|
|
|
2013-05-03 07:28:02 +00:00
|
|
|
Mapper.Entity<History.History>().RegisterModel("History")
|
2017-11-26 03:51:37 +00:00
|
|
|
.AutoMapChildModels();
|
2013-03-26 05:51:56 +00:00
|
|
|
|
2017-06-13 02:02:17 +00:00
|
|
|
Mapper.Entity<Artist>().RegisterModel("Artists")
|
2017-11-26 03:51:37 +00:00
|
|
|
.Ignore(s => s.RootFolderPath)
|
2018-12-15 00:02:43 +00:00
|
|
|
.Ignore(s => s.Name)
|
|
|
|
.Ignore(s => s.ForeignArtistId)
|
2017-11-26 03:51:37 +00:00
|
|
|
.Relationship()
|
2018-12-15 00:02:43 +00:00
|
|
|
.HasOne(a => a.Metadata, a => a.ArtistMetadataId)
|
2019-02-23 22:39:11 +00:00
|
|
|
.HasOne(a => a.QualityProfile, a => a.QualityProfileId)
|
2017-11-26 03:51:37 +00:00
|
|
|
.HasOne(s => s.LanguageProfile, s => s.LanguageProfileId)
|
2018-12-15 00:02:43 +00:00
|
|
|
.HasOne(s => s.MetadataProfile, s => s.MetadataProfileId)
|
|
|
|
.For(a => a.Albums)
|
|
|
|
.LazyLoad(condition: a => a.Id > 0, query: (db, a) => db.Query<Album>().Where(rg => rg.ArtistMetadataId == a.Id).ToList());
|
2017-04-20 23:19:47 +00:00
|
|
|
|
2018-12-15 00:02:43 +00:00
|
|
|
Mapper.Entity<ArtistMetadata>().RegisterModel("ArtistMetadata");
|
2017-06-13 02:02:17 +00:00
|
|
|
|
2018-12-15 00:02:43 +00:00
|
|
|
Mapper.Entity<Album>().RegisterModel("Albums")
|
|
|
|
.Ignore(r => r.ArtistId)
|
|
|
|
.Relationship()
|
|
|
|
.HasOne(r => r.ArtistMetadata, r => r.ArtistMetadataId)
|
|
|
|
.For(rg => rg.AlbumReleases)
|
|
|
|
.LazyLoad(condition: rg => rg.Id > 0, query: (db, rg) => db.Query<AlbumRelease>().Where(r => r.AlbumId == rg.Id).ToList())
|
|
|
|
.For(rg => rg.Artist)
|
2019-02-16 14:49:24 +00:00
|
|
|
.LazyLoad(condition: rg => rg.ArtistMetadataId > 0,
|
|
|
|
query: (db, rg) => db.Query<Artist>()
|
|
|
|
.Join<Artist, ArtistMetadata>(JoinType.Inner, a => a.Metadata, (a, m) => a.ArtistMetadataId == m.Id)
|
|
|
|
.Where(a => a.ArtistMetadataId == rg.ArtistMetadataId).SingleOrDefault());
|
2018-12-15 00:02:43 +00:00
|
|
|
|
|
|
|
Mapper.Entity<AlbumRelease>().RegisterModel("AlbumReleases")
|
|
|
|
.Relationship()
|
|
|
|
.HasOne(r => r.Album, r => r.AlbumId)
|
|
|
|
.For(r => r.Tracks)
|
|
|
|
.LazyLoad(condition: r => r.Id > 0, query: (db, r) => db.Query<Track>().Where(t => t.AlbumReleaseId == r.Id).ToList());
|
2017-04-20 23:19:47 +00:00
|
|
|
|
|
|
|
Mapper.Entity<Track>().RegisterModel("Tracks")
|
2018-12-15 00:02:43 +00:00
|
|
|
.Ignore(t => t.HasFile)
|
|
|
|
.Ignore(t => t.AlbumId)
|
|
|
|
.Ignore(t => t.Album)
|
|
|
|
.Relationship()
|
|
|
|
.HasOne(track => track.AlbumRelease, track => track.AlbumReleaseId)
|
|
|
|
.HasOne(track => track.ArtistMetadata, track => track.ArtistMetadataId)
|
2019-02-16 14:49:24 +00:00
|
|
|
.For(track => track.TrackFile)
|
|
|
|
.LazyLoad(condition: track => track.TrackFileId > 0,
|
|
|
|
query: (db, track) => db.Query<TrackFile>()
|
|
|
|
.Join<TrackFile, Track>(JoinType.Inner, t => t.Tracks, (t, x) => t.Id == x.TrackFileId)
|
|
|
|
.Join<TrackFile, Album>(JoinType.Inner, t => t.Album, (t, a) => t.AlbumId == a.Id)
|
|
|
|
.Join<TrackFile, Artist>(JoinType.Inner, t => t.Artist, (t, a) => t.Album.Value.ArtistMetadataId == a.ArtistMetadataId)
|
|
|
|
.Join<Artist, ArtistMetadata>(JoinType.Inner, a => a.Metadata, (a, m) => a.ArtistMetadataId == m.Id)
|
|
|
|
.Where(t => t.Id == track.TrackFileId)
|
|
|
|
.SingleOrDefault())
|
2018-12-15 00:02:43 +00:00
|
|
|
.For(t => t.Artist)
|
2019-02-16 14:49:24 +00:00
|
|
|
.LazyLoad(condition: t => t.AlbumReleaseId > 0, query: (db, t) => db.Query<Artist>()
|
|
|
|
.Join<Artist, ArtistMetadata>(JoinType.Inner, a => a.Metadata, (a, m) => a.ArtistMetadataId == m.Id)
|
|
|
|
.Join<Artist, Album>(JoinType.Inner, a => a.Albums, (l, r) => l.ArtistMetadataId == r.ArtistMetadataId)
|
|
|
|
.Join<Album, AlbumRelease>(JoinType.Inner, a => a.AlbumReleases, (l, r) => l.Id == r.AlbumId)
|
|
|
|
.Where<AlbumRelease>(r => r.Id == t.AlbumReleaseId)
|
|
|
|
.SingleOrDefault());
|
2018-12-15 00:02:43 +00:00
|
|
|
|
|
|
|
Mapper.Entity<TrackFile>().RegisterModel("TrackFiles")
|
|
|
|
.Ignore(f => f.Path)
|
|
|
|
.Relationship()
|
|
|
|
.HasOne(f => f.Album, f => f.AlbumId)
|
2019-02-16 14:49:24 +00:00
|
|
|
.For(f => f.Tracks)
|
|
|
|
.LazyLoad(condition: f => f.Id > 0, query: (db, f) => db.Query<Track>()
|
|
|
|
.Where(x => x.TrackFileId == f.Id)
|
|
|
|
.ToList())
|
2018-12-15 00:02:43 +00:00
|
|
|
.For(t => t.Artist)
|
2019-02-16 14:49:24 +00:00
|
|
|
.LazyLoad(condition: f => f.Id > 0, query: (db, f) => db.Query<Artist>()
|
|
|
|
.Join<Artist, ArtistMetadata>(JoinType.Inner, a => a.Metadata, (a, m) => a.ArtistMetadataId == m.Id)
|
|
|
|
.Join<Artist, Album>(JoinType.Inner, a => a.Albums, (l, r) => l.ArtistMetadataId == r.ArtistMetadataId)
|
|
|
|
.Where<Album>(r => r.Id == f.AlbumId)
|
|
|
|
.SingleOrDefault());
|
2017-04-20 23:19:47 +00:00
|
|
|
|
2014-12-09 03:27:33 +00:00
|
|
|
Mapper.Entity<QualityDefinition>().RegisterModel("QualityDefinitions")
|
2017-11-16 02:24:33 +00:00
|
|
|
.Ignore(d => d.GroupName)
|
2017-11-21 00:20:21 +00:00
|
|
|
.Ignore(d => d.GroupWeight)
|
2014-12-09 03:27:33 +00:00
|
|
|
.Ignore(d => d.Weight);
|
|
|
|
|
2019-02-23 22:39:11 +00:00
|
|
|
Mapper.Entity<QualityProfile>().RegisterModel("QualityProfiles");
|
2017-09-04 02:20:56 +00:00
|
|
|
Mapper.Entity<LanguageProfile>().RegisterModel("LanguageProfiles");
|
2017-11-26 03:51:37 +00:00
|
|
|
Mapper.Entity<MetadataProfile>().RegisterModel("MetadataProfiles");
|
2013-03-25 06:13:53 +00:00
|
|
|
Mapper.Entity<Log>().RegisterModel("Logs");
|
2013-04-25 04:27:49 +00:00
|
|
|
Mapper.Entity<NamingConfig>().RegisterModel("NamingConfig");
|
2017-06-25 13:17:49 +00:00
|
|
|
Mapper.Entity<AlbumStatistics>().MapResultSet();
|
2013-10-23 06:36:31 +00:00
|
|
|
Mapper.Entity<Blacklist>().RegisterModel("Blacklist");
|
2014-01-24 16:17:56 +00:00
|
|
|
Mapper.Entity<MetadataFile>().RegisterModel("MetadataFiles");
|
2017-10-25 01:25:29 +00:00
|
|
|
Mapper.Entity<LyricFile>().RegisterModel("LyricFiles");
|
2015-12-25 09:22:00 +00:00
|
|
|
Mapper.Entity<OtherExtraFile>().RegisterModel("ExtraFiles");
|
2014-06-08 08:22:55 +00:00
|
|
|
|
|
|
|
Mapper.Entity<PendingRelease>().RegisterModel("PendingReleases")
|
2017-10-19 01:42:57 +00:00
|
|
|
.Ignore(e => e.RemoteAlbum);
|
2014-09-11 20:24:00 +00:00
|
|
|
|
|
|
|
Mapper.Entity<RemotePathMapping>().RegisterModel("RemotePathMappings");
|
2014-09-10 00:02:55 +00:00
|
|
|
Mapper.Entity<Tag>().RegisterModel("Tags");
|
2019-02-23 22:39:11 +00:00
|
|
|
Mapper.Entity<ReleaseProfile>().RegisterModel("ReleaseProfiles");
|
2014-11-24 00:07:46 +00:00
|
|
|
|
|
|
|
Mapper.Entity<DelayProfile>().RegisterModel("DelayProfiles");
|
2015-01-26 02:03:21 +00:00
|
|
|
Mapper.Entity<User>().RegisterModel("Users");
|
2015-01-16 00:30:09 +00:00
|
|
|
Mapper.Entity<CommandModel>().RegisterModel("Commands")
|
|
|
|
.Ignore(c => c.Message);
|
2015-06-27 09:43:17 +00:00
|
|
|
|
|
|
|
Mapper.Entity<IndexerStatus>().RegisterModel("IndexerStatus");
|
2017-10-27 03:21:06 +00:00
|
|
|
Mapper.Entity<DownloadClientStatus>().RegisterModel("DownloadClientStatus");
|
2018-02-06 23:08:36 +00:00
|
|
|
Mapper.Entity<ImportListStatus>().RegisterModel("ImportListStatus");
|
2018-09-23 03:10:50 +00:00
|
|
|
|
|
|
|
Mapper.Entity<CustomFilter>().RegisterModel("CustomFilters");
|
2013-03-25 06:13:53 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
private static void RegisterMappers()
|
|
|
|
{
|
2013-04-01 00:20:01 +00:00
|
|
|
RegisterEmbeddedConverter();
|
2013-09-21 06:39:26 +00:00
|
|
|
RegisterProviderSettingConverter();
|
2013-04-01 00:20:01 +00:00
|
|
|
|
2015-10-03 17:45:26 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(int), new Int32Converter());
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(double), new DoubleConverter());
|
2013-06-09 20:50:57 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(DateTime), new UtcConverter());
|
2015-10-03 17:45:26 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(bool), new BooleanIntConverter());
|
2013-03-26 05:51:56 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Enum), new EnumIntConverter());
|
2013-03-26 08:02:31 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Quality), new QualityIntConverter());
|
2019-02-23 22:39:11 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<QualityProfileQualityItem>), new EmbeddedDocumentConverter(new QualityIntConverter()));
|
2014-01-29 00:53:59 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(QualityModel), new EmbeddedDocumentConverter(new QualityIntConverter()));
|
2015-10-03 17:45:26 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Dictionary<string, string>), new EmbeddedDocumentConverter());
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<int>), new EmbeddedDocumentConverter());
|
2019-02-23 22:39:11 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<KeyValuePair<string, int>>), new EmbeddedDocumentConverter());
|
2017-09-04 02:20:56 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Language), new LanguageIntConverter());
|
2015-10-03 17:45:26 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<string>), new EmbeddedDocumentConverter());
|
2019-02-23 22:39:11 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<LanguageProfileItem>), new EmbeddedDocumentConverter(new LanguageIntConverter()));
|
2017-11-26 03:51:37 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<ProfilePrimaryAlbumTypeItem>), new EmbeddedDocumentConverter(new PrimaryAlbumTypeIntConverter()));
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<ProfileSecondaryAlbumTypeItem>), new EmbeddedDocumentConverter(new SecondaryAlbumTypeIntConverter()));
|
2018-03-22 00:43:10 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(List<ProfileReleaseStatusItem>), new EmbeddedDocumentConverter(new ReleaseStatusIntConverter()));
|
2017-10-19 01:42:57 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(ParsedAlbumInfo), new EmbeddedDocumentConverter());
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(ParsedTrackInfo), new EmbeddedDocumentConverter());
|
2014-06-08 08:22:55 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(ReleaseInfo), new EmbeddedDocumentConverter());
|
2015-10-03 17:45:26 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(HashSet<int>), new EmbeddedDocumentConverter());
|
2014-10-12 22:00:03 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(OsPath), new OsPathConverter());
|
2015-01-26 02:03:21 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Guid), new GuidConverter());
|
2015-01-16 00:30:09 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(Command), new CommandConverter());
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(TimeSpan), new TimeSpanConverter());
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(typeof(TimeSpan?), new TimeSpanConverter());
|
2013-03-25 06:13:53 +00:00
|
|
|
}
|
2013-04-01 00:20:01 +00:00
|
|
|
|
2013-09-21 06:39:26 +00:00
|
|
|
private static void RegisterProviderSettingConverter()
|
|
|
|
{
|
|
|
|
var settingTypes = typeof(IProviderConfig).Assembly.ImplementationsOf<IProviderConfig>();
|
|
|
|
|
|
|
|
var providerSettingConverter = new ProviderSettingConverter();
|
|
|
|
foreach (var embeddedType in settingTypes)
|
|
|
|
{
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(embeddedType, providerSettingConverter);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-04-01 00:20:01 +00:00
|
|
|
private static void RegisterEmbeddedConverter()
|
|
|
|
{
|
2013-09-21 06:39:26 +00:00
|
|
|
var embeddedTypes = typeof(IEmbeddedDocument).Assembly.ImplementationsOf<IEmbeddedDocument>();
|
2013-04-01 00:20:01 +00:00
|
|
|
|
2013-05-13 02:52:55 +00:00
|
|
|
var embeddedConvertor = new EmbeddedDocumentConverter();
|
2013-04-01 00:20:01 +00:00
|
|
|
var genericListDefinition = typeof(List<>).GetGenericTypeDefinition();
|
2014-09-10 00:02:55 +00:00
|
|
|
|
2013-04-01 00:20:01 +00:00
|
|
|
foreach (var embeddedType in embeddedTypes)
|
|
|
|
{
|
|
|
|
var embeddedListType = genericListDefinition.MakeGenericType(embeddedType);
|
2014-09-10 00:02:55 +00:00
|
|
|
|
2013-04-01 00:20:01 +00:00
|
|
|
MapRepository.Instance.RegisterTypeConverter(embeddedType, embeddedConvertor);
|
|
|
|
MapRepository.Instance.RegisterTypeConverter(embeddedListType, embeddedConvertor);
|
|
|
|
}
|
|
|
|
}
|
2013-03-25 06:13:53 +00:00
|
|
|
}
|
2017-09-04 02:20:56 +00:00
|
|
|
}
|