public ApiListingComparer(
     ApiListing oldApiListing,
     ApiListing newApiListing)
 {
     _oldApiListing = oldApiListing;
     _newApiListing = newApiListing;
 }
        public ApiListing GenerateApiListing()
        {
            var types = _assembly.DefinedTypes
#if NETCOREAPP3_0 // Reflection does not provide a hook to enumerate forwarded types in .NET Framework.
                        .Concat(_assembly
                                .GetForwardedTypes()
                                .Select(type => type.GetTypeInfo()))
#endif
                        .Where(t => t.IsPublic || t.IsNestedPublic || t.IsNestedFamily || t.IsNestedFamORAssem);

            var document = new ApiListing
            {
                AssemblyIdentity = _assembly.GetName().ToString(),
                SourceFilters    = _filters
            };

            foreach (var type in types.Where(t => !_filters.Any(filter => filter(t))))
            {
                var apiListingType = GenerateTypeDescriptor(type);
                document.Types.Add(apiListingType);
            }

            return(document);
        }