in src/DotPulsar/Schemas/AvroGenericRecordSchema.cs [170:190]
private static MethodInfo LoadAvroSchemaParseMethod(IEnumerable<MethodInfo> methods)
{
const string name = "Parse";
foreach (var method in methods)
{
if (method.Name != name || method.ReturnType.FullName != AvroSchemafullName || !method.IsStatic)
continue;
var parameters = method.GetParameters();
if (parameters.Length != 1)
continue;
if (parameters[0].ParameterType != typeof(string))
continue;
return method;
}
throw new SchemaException($"A method with the name '{name}' matching the delegate was not found");
}