Add check to InputJsonConverterFactory
As of .NET 8, base type Input is also seen.
This commit is contained in:
parent
f5962501bc
commit
fa1e9ba70f
|
|
@ -16,7 +16,7 @@ public class InputJsonConverterFactory : JsonConverterFactory
|
|||
public InputJsonConverterFactory(IServiceProvider serviceProvider) => _serviceProvider = serviceProvider;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override bool CanConvert(Type typeToConvert) => typeof(Input).IsAssignableFrom(typeToConvert);
|
||||
public override bool CanConvert(Type typeToConvert) => typeof(Input).IsAssignableFrom(typeToConvert) && typeToConvert.IsGenericType;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override JsonConverter CreateConverter(Type typeToConvert, JsonSerializerOptions options)
|
||||
|
|
|
|||
Loading…
Reference in a new issue