mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-13 16:43:58 -07:00
embedded type convector is now registered for all embedded types automatically.
This commit is contained in:
parent
bdcdc7c0f6
commit
c1fba9093d
5 changed files with 42 additions and 24 deletions
|
@ -38,7 +38,7 @@ namespace Marr.Data
|
|||
internal Dictionary<Type, string> Tables { get; set; }
|
||||
internal Dictionary<Type, ColumnMapCollection> Columns { get; set; }
|
||||
internal Dictionary<Type, RelationshipCollection> Relationships { get; set; }
|
||||
internal Dictionary<Type, IConverter> TypeConverters { get; set; }
|
||||
public Dictionary<Type, IConverter> TypeConverters { get; private set; }
|
||||
|
||||
// Explicit static constructor to tell C# compiler
|
||||
// not to mark type as beforefieldinit
|
||||
|
@ -203,14 +203,7 @@ namespace Marr.Data
|
|||
/// <param name="converter">An IConverter object that will handle the data conversion.</param>
|
||||
public void RegisterTypeConverter(Type type, IConverter converter)
|
||||
{
|
||||
if (TypeConverters.ContainsKey(type))
|
||||
{
|
||||
TypeConverters[type] = converter;
|
||||
}
|
||||
else
|
||||
{
|
||||
TypeConverters.Add(type, converter);
|
||||
}
|
||||
TypeConverters[type] = converter;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue