You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
YamlDotNet tries to get generic reflection on an interface that is not guaranteed to be generic:
public sealed class DefaultObjectFactory : IObjectFactory
//...
public object Create(Type type)
{
if (type.IsInterface())
{
if (defaultInterfaceImplementations.TryGetValue(type.GetGenericTypeDefinition(), out var implementationType))
{
type = implementationType.MakeGenericType(type.GetGenericArguments());
}
}
System.InvalidOperationException: This operation is only valid on generic types.
at System.RuntimeType.GetGenericTypeDefinition()
at YamlDotNet.Serialization.ObjectFactories.DefaultObjectFactory.Create(Type type)
at YamlDotNet.Serialization.NodeDeserializers.ObjectNodeDeserializer.YamlDotNet.Serialization.INodeDeserializer.Deserialize(IParser parser, Type expectedType, Func`3 nestedObjectDeserializer, Object& value)
at YamlDotNet.Serialization.ValueDeserializers.NodeValueDeserializer.DeserializeValue(IParser parser, Type expectedType, SerializerState state, IValueDeserializer nestedObjectDeserializer)
The text was updated successfully, but these errors were encountered:
YamlDotNet tries to get generic reflection on an interface that is not guaranteed to be generic:
YamlDotNet/YamlDotNet/Serialization/ObjectFactories/DefaultObjectFactory.cs
Line 44 in b3cf637
Trace:
The text was updated successfully, but these errors were encountered: