Cannot use generics as declared reader and writers

This commit is contained in:
Paul Pacheco 2020-09-28 09:17:33 -05:00
parent f9ecc64468
commit 694de7255b

View File

@ -66,6 +66,9 @@ static void LoadDeclaredWriters(AssemblyDefinition currentAssembly, TypeDefiniti
if (!method.HasCustomAttribute<System.Runtime.CompilerServices.ExtensionAttribute>())
continue;
if (method.HasGenericParameters)
continue;
TypeReference dataType = method.Parameters[1].ParameterType;
Writers.Register(dataType, currentAssembly.MainModule.ImportReference(method));
}
@ -88,6 +91,9 @@ static void LoadDeclaredReaders(AssemblyDefinition currentAssembly, TypeDefiniti
if (!method.HasCustomAttribute<System.Runtime.CompilerServices.ExtensionAttribute>())
continue;
if (method.HasGenericParameters)
continue;
Readers.Register(method.ReturnType, currentAssembly.MainModule.ImportReference(method));
}
}