Exemple #1
0
        private IBuilder ConvertToInSolutionReference(IReferenceBuilder referenceBuilder, Project referencedProject)
        {
            if (!referenceMappings.ContainsKey(referenceBuilder))
            {
                var inSolutionBuilder = inSolutionReferenceBuilderFactory.CreateInSolutionReferenceBuilder(referencedProject);
                inSolutionBuilder.Reference = referenceBuilder.Reference;

                referenceMappings.Add(referenceBuilder, inSolutionBuilder);
                return(inSolutionBuilder);
            }
            else
            {
                return(referenceMappings[referenceBuilder]);
            }
        }
Exemple #2
0
        void ReplaceWithInSolutionReference(ISet <EquatableEdge <IBuilder> > graph, IEnumerable <ISlnProjectBuilder> childProjectBuilders, SuiteReferenceBuilder dep)
        {
            var inSolutionRef = inSolutionReferenceBuilderFactory.CreateInSolutionReferenceBuilder(dep.ReferencedProject);

            inSolutionRef.Reference = dep.Reference;

            foreach (var builder in childProjectBuilders)
            {
                builder.RemovePrerequisite(dep);

                var edgesToModify = new HashSet <EquatableEdge <IBuilder> >(graph.Where(edge => edge.Source == builder && edge.Target == dep));
                RemoveEdges(graph, edgesToModify);

                foreach (var edge in edgesToModify)
                {
                    var newEdge = new EquatableEdge <IBuilder>(edge.Source, inSolutionRef);
                    AddEdge(graph, newEdge);
                }
            }
        }