Browse Source

Fixed CustomObjectConverter

pull/46/head
Anairkoen Schno 4 years ago
parent
commit
2aaff92449
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> /// <summary>
/// Gets the default <see cref="ValueConverter{T}"/> for the current type. /// Gets the default <see cref="ValueConverter{T}"/> for the current type.
/// </summary> /// </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() 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( 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> /// <summary>
/// Deserializes <paramref name="value"/> into a <typeparamref name="T"/> with the given <paramref name="parent"/>. /// Deserializes <paramref name="value"/> into a <typeparamref name="T"/> with the given <paramref name="parent"/>.


Loading…
Cancel
Save