<commit_before>using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using FluentSecurity.Configuration;

namespace FluentSecurity.Scanning.TypeScanners
{
	internal class ProfileTypeScanner : ITypeScanner
	{
		public static readonly Type ProfileType = typeof(SecurityProfile);

		public IEnumerable<Type> Scan(IEnumerable<Assembly> assemblies)
		{
			var results = new List<Type>();
			foreach (var assembly in assemblies)
			{
				
				var profileTypes = assembly.GetExportedTypes()
					.Where(type => ProfileType.IsAssignableFrom(type) && type != ProfileType)
					.ToList();

				results.AddRange(profileTypes);
			}
			return results;
		}
	}
}<commit_msg>- Using GetLoadableExportedTypes extension to avoid type loading issues in ProfileTypeScanner.<commit_after>using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using FluentSecurity.Configuration;
using FluentSecurity.Internals;

namespace FluentSecurity.Scanning.TypeScanners
{
	internal class ProfileTypeScanner : ITypeScanner
	{
		public static readonly Type ProfileType = typeof(SecurityProfile);

		public IEnumerable<Type> Scan(IEnumerable<Assembly> assemblies)
		{
			var results = new List<Type>();
			foreach (var assembly in assemblies)
			{
				var profileTypes = assembly.GetLoadableExportedTypes()
					.Where(type => ProfileType.IsAssignableFrom(type) && type != ProfileType)
					.ToList();

				results.AddRange(profileTypes);
			}
			return results;
		}
	}
}
{'fraction_non_alphanumeric': 0.09126984126984126, 'fraction_numerical': 0.0, 'mean_word_length': 4.841698841698841, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5560688', 'n_tokens_mistral': 493, 'n_tokens_neox': 418, 'n_words': 104}