private static Type LoadSpecificDatumWriterType()

in src/DotPulsar/Schemas/AvroISpecificRecordSchema.cs [129:140]


    private static Type LoadSpecificDatumWriterType(IEnumerable<TypeInfo> types)
    {
        const string fullName = "Avro.Specific.SpecificDatumWriter`1";

        foreach (var type in types)
        {
            if (type.IsPublic && type.IsClass && type.IsGenericType && type.FullName is not null && type.FullName.Equals(fullName))
                return type.MakeGenericType(typeof(T));
        }

        throw new SchemaException($"'{fullName}' as a generic public class was not found");
    }