<commit_before>namespace ArguMint.UnitTests.Dynamic
{
   public class ClassBuilder
   {
   }
}
<commit_msg>+Create factory method to initialize an instance as a builder<commit_after>﻿using System;
using System.Reflection;
using System.Reflection.Emit;

namespace ArguMint.UnitTests.Dynamic
{
   public class ClassBuilder
   {
      private readonly TypeBuilder _typeBuilder;

      private ClassBuilder( TypeBuilder typeBuilder )
      {
         _typeBuilder = typeBuilder;
      }

      public static ClassBuilder Create()
      {
         var assemblyName = new AssemblyName( $"ClassBuilderProxyAssembly_{Guid.NewGuid()}" );

         AssemblyBuilder assemblyBuilder = AppDomain.CurrentDomain.DefineDynamicAssembly( assemblyName, AssemblyBuilderAccess.Run );
         ModuleBuilder moduleBuilder = assemblyBuilder.DefineDynamicModule( "MainModule" );

         var typeName = $"DynamicClass_{Guid.NewGuid()}";

         TypeBuilder typeBuilder = moduleBuilder.DefineType( typeName,
            TypeAttributes.Public |
            TypeAttributes.Class |
            TypeAttributes.AutoClass |
            TypeAttributes.AnsiClass |
            TypeAttributes.BeforeFieldInit |
            TypeAttributes.AutoLayout,
            typeof( object ) );

         return new ClassBuilder( typeBuilder );
      }
   }
}

{'fraction_non_alphanumeric': 0.0737082066869301, 'fraction_numerical': 0.0, 'mean_word_length': 2.908011869436202, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5709377', 'n_tokens_mistral': 327, 'n_tokens_neox': 319, 'n_words': 72}