/// <summary>
        /// Loads the <see cref="BoundedContextConfiguration"/> from file and uses it to build the <see cref="BoundedContextConfiguration"/> using the <see cref="TopologyBuilder"/>
        /// </summary>
        /// <param name="types">The discovered artifact types from the bounded context's assemblies</param>
        /// <param name="configuration"></param>
        public Applications.Configuration.Topology Build(Type[] types, BuildTaskConfiguration configuration)
        {
            var topology = _configurationManager.Load();
            var boundedContextTopology = new BoundedContextTopology(topology, configuration.UseModules, configuration.NamespaceSegmentsToStrip);

            return(new TopologyBuilder(types, boundedContextTopology, _buildMessages).Build());
        }
Exemplo n.º 2
0
        /// <summary>
        /// Loads the <see cref="BoundedContextConfiguration"/> from file and uses it to build the <see cref="BoundedContextConfiguration"/> using the <see cref="TopologyBuilder"/>
        /// </summary>
        /// <param name="types">The discovered artifact types from the bounded context's assemblies</param>
        /// <param name="parsingResults"></param>
        public Applications.Configuration.Topology Build(Type[] types, ArgumentsParsingResult parsingResults)
        {
            var topology = _configurationManager.Load();
            var boundedContextTopology = new BoundedContextTopology(topology, parsingResults.UseModules, parsingResults.NamespaceSegmentsToStrip);

            return(new TopologyBuilder(types, boundedContextTopology, _logger).Build());
        }
Exemplo n.º 3
0
 /// <summary>
 /// Instantiates an instance of <see cref="TopologyBuilder"/>
 /// </summary>
 /// <param name="artifacts">The discovered types of artifacts in the Bounded Context's assemblies</param>
 /// <param name="boundedContextTopology">The <see cref="BoundedContextConfiguration"/> that will be modified, validated and returned from Build</param>
 /// <param name="buildMessages"></param>
 public TopologyBuilder(Type[] artifacts, BoundedContextTopology boundedContextTopology, IBuildMessages buildMessages)
 {
     _artifactTypes = artifacts;
     _buildMessages = buildMessages;
     _configuration = boundedContextTopology;
 }
Exemplo n.º 4
0
 /// <summary>
 /// Instantiates an instance of <see cref="TopologyBuilder"/>
 /// </summary>
 /// <param name="artifacts">The discovered types of artifacts in the Bounded Context's assemblies</param>
 /// <param name="boundedContextTopology">The <see cref="BoundedContextConfiguration"/> that will be modified, validated and returned from Build</param>
 /// <param name="logger"></param>
 public TopologyBuilder(Type[] artifacts, BoundedContextTopology boundedContextTopology, IBuildToolLogger logger)
 {
     _artifactTypes = artifacts;
     _logger        = logger;
     _configuration = boundedContextTopology;
 }