public static IBoundedContextModel WithAllAppDomainAssemblies(this IBoundedContextModel contextMap)
        {
            var assemblies = AppDomain.CurrentDomain.GetAssemblies();

            foreach (var assembly in assemblies.Where(a => !a.IsDynamic))
            {
                contextMap.WithAssembly(assembly, null);
            }

            return(contextMap);
        }
        public static IBoundedContextModel WithAssembly(this IBoundedContextModel contextMap, string assemblyName, string contextNamespace = null)
        {
            var assembly = Assembly.Load(assemblyName);

            if (assembly.IsDynamic)
            {
                throw new ArgumentException("Dynamic assemblies are not supported.");
            }

            contextMap.WithAssembly(assembly, contextNamespace);

            return(contextMap);
        }