private static TypeInfo FindSnappy()

in src/DotPulsar/Internal/Compression/SnappyCompression.cs [60:76]


    private static TypeInfo FindSnappy(IEnumerable<TypeInfo> types)
    {
        const string fullName = "IronSnappy.Snappy";

        foreach (var type in types)
        {
            if (type.FullName is null || !type.FullName.Equals(fullName))
                continue;

            if (type.IsPublic && type.IsClass && type.IsAbstract && type.IsSealed)
                return type;

            break;
        }

        throw new Exception($"{fullName} as a public and static class was not found");
    }