<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace Ignition.Foundation.Core.Automap
{
  public static class IgnitionAutomapHelper
  {
    public static IEnumerable<Assembly> GetAutomappedAssemblies()
    {
      var automappedAssemblies = Assembly.GetExecutingAssembly().GetReferencedAssemblies().Select(Assembly.Load).ToList();

      // load possible standalone assemblies
      automappedAssemblies.AddRange(AppDomain.CurrentDomain.GetAssemblies()
        .Where(IsAutomappedAssembly)
        .Where(a => !automappedAssemblies.Contains(a))
        .Select(a => Assembly.Load(a.FullName)));

      return automappedAssemblies.ToList();<commit_msg>Fix AutomapHelper to only return assemblies decorated with IgnitionAutomapAttribute<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace Ignition.Foundation.Core.Automap
{
  public static class IgnitionAutomapHelper
  {
    public static IEnumerable<Assembly> GetAutomappedAssemblies()
    {
      var automappedAssemblies = Assembly.GetExecutingAssembly().GetReferencedAssemblies()
        .Select(Assembly.Load)
        .Where(IsAutomappedAssembly)
        .ToList();

      // load possible standalone assemblies
      automappedAssemblies.AddRange(AppDomain.CurrentDomain.GetAssemblies()
        .Where(IsAutomappedAssembly)
        .Where(a => !automappedAssemblies.Contains(a))
        .Select(a => Assembly.Load(a.FullName)));

      return automappedAssemblies.ToList();
{'fraction_non_alphanumeric': 0.09429121231558692, 'fraction_numerical': 0.0, 'mean_word_length': 4.397923875432526, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '1788510', 'n_tokens_mistral': 435, 'n_tokens_neox': 422, 'n_words': 76}