File size: 553 Bytes
fab29d7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
namespace VersOne.Epub.Test.Integration.JsonUtils.Configuration
{
internal class JsonSerializerConfiguration
{
private readonly Dictionary<Type, CustomType> customTypes;
public JsonSerializerConfiguration(IEnumerable<CustomType> customTypes)
{
this.customTypes = customTypes.ToDictionary(customType => customType.Type);
}
public CustomType? GetCustomType(Type type)
{
customTypes.TryGetValue(type, out CustomType? result);
return result;
}
}
}
|