Browse Source

Fixed CustomObjectConverter

pull/44/head
Anairkoen Schno 4 years ago
parent
commit
8add6364df
2 changed files with 3 additions and 10 deletions
  1. +2
    -9
      IPA.Loader/Config/Stores/Converters.cs
  2. +1
    -1
      IPA.Loader/Config/Stores/CustomObjectConverter.cs

+ 2
- 9
IPA.Loader/Config/Stores/Converters.cs View File

@ -84,15 +84,8 @@ namespace IPA.Config.Stores.Converters
/// <summary>
/// Gets the default <see cref="ValueConverter{T}"/> for the current type.
/// </summary>
public static ValueConverter<T> Default
{
get
{
if (defaultConverter == null)
defaultConverter = MakeDefault();
return defaultConverter;
}
}
public static ValueConverter<T> Default
=> defaultConverter ??= MakeDefault();
private static ValueConverter<T> MakeDefault()
{


+ 1
- 1
IPA.Loader/Config/Stores/CustomObjectConverter.cs View File

@ -42,7 +42,7 @@ namespace IPA.Config.Stores.Converters
}
private static readonly IImpl impl = (IImpl)Activator.CreateInstance(
typeof(Impl<>).MakeGenericType(GeneratedStoreImpl.GetGeneratedType(typeof(T))));
typeof(Impl<>).MakeGenericType(typeof(T), GeneratedStoreImpl.GetGeneratedType(typeof(T))));
/// <summary>
/// Deserializes <paramref name="value"/> into a <typeparamref name="T"/> with the given <paramref name="parent"/>.


Loading…
Cancel
Save