/// <inheritdoc/>
        public void Perform()
        {
            var assembliesConfigurationBuilder = new AssembliesConfigurationBuilder();

            assembliesConfigurationBuilder
            .ExcludeAll()
            .ExceptProjectLibraries()
            .ExceptDolittleLibraries();

            var entryAssembly = _buildTarget.Assembly;

            var assembliesConfiguration = new AssembliesConfiguration(assembliesConfigurationBuilder.RuleBuilder);
            var assemblyFilters         = new AssemblyFilters(assembliesConfiguration);

            var assemblyProvider = new Dolittle.Assemblies.AssemblyProvider(
                new ICanProvideAssemblies[] { new DefaultAssemblyProvider(_logger, entryAssembly) },
                assemblyFilters,
                new AssemblyUtility(),
                _logger
                );

            var assemblies = new Dolittle.Assemblies.Assemblies(entryAssembly, assemblyProvider);
            var contractToImplementorsMap = new ContractToImplementorsMap(new AsyncScheduler());

            Parallel.ForEach(assemblies.GetAll(), _ =>
            {
                try
                {
                    var types = _.GetTypes();
                    contractToImplementorsMap.Feed(types);
                }
                catch {}
            });

            var contractsToImplementors = contractToImplementorsMap.ContractsAndImplementors;

            var serializedMap = _serializer.SerializeMap(contractsToImplementors);

            _modifiers.AddModifier(new EmbedResource(CachedContractToImplementorsMap.MapResourceName, Encoding.UTF8.GetBytes(serializedMap)));
            var serializedTypes = _serializer.SerializeTypes(contractToImplementorsMap.All);

            _modifiers.AddModifier(new EmbedResource(CachedContractToImplementorsMap.TypesResourceName, Encoding.UTF8.GetBytes(serializedTypes)));

            var implementors = contractsToImplementors.Values.Sum(_ => _.Count());

            _buildMessages.Information($"Embedded a map with {contractsToImplementors.Keys.Count} contracts to {implementors} implementors");
        }
        /// <summary>
        /// Perform the embedding.
        /// </summary>
        public void Perform()
        {
            var files = new List <string>
            {
                _configuration.BoundedContextFilePath
            };

            files.AddRange(Directory.GetFiles(_configuration.DolittleFolder));

            OverrideWithLocalFiles(files);

            foreach (var file in files.Where(File.Exists))
            {
                var name = $"{_buildTarget.AssemblyName.Name}.{Path.GetFileName(file)}";
                _buildMessages.Information($"Adding artifact resource '{name}'");
                _modifiers.AddModifier(new EmbedResource(name, File.ReadAllBytes(file)));
            }

            AddAssembliesJson();
            AddLibrariesJson();
        }