예제 #1
0
 /// <summary>
 /// Error constructor.
 /// </summary>
 /// <param name="analyzer">The analyzer.</param>
 /// <param name="rSolution">The dependency sorter result.</param>
 /// <param name="buildProjectsInfo">Build info may be on error or not.</param>
 internal SolutionDependencyContext(
     DependencyAnalyzer analyzer,
     IDependencySorterResult rSolution,
     BuildProjectsInfo buildProjectsInfo)
 {
     Debug.Assert(analyzer != null && buildProjectsInfo != null && rSolution != null && !rSolution.IsComplete);
     _analyzer = analyzer;
     RawSolutionSorterResult = rSolution;
     BuildProjectsInfo       = buildProjectsInfo;
     DependencyTable         = Array.Empty <DependentSolution.Row>();
     Solutions = Array.Empty <DependentSolution>();
 }
예제 #2
0
 internal SolutionDependencyContext(
     DependencyAnalyzer analyzer,
     Dictionary <object, DependentSolution> index,
     IDependencySorterResult r,
     IReadOnlyList <DependentSolution.Row> t,
     IReadOnlyList <DependentSolution> solutions,
     BuildProjectsInfo buildProjectsInfo)
 {
     Debug.Assert(analyzer != null && r != null && r.IsComplete && t != null && solutions != null);
     _analyzer = analyzer;
     _index    = index;
     RawSolutionSorterResult = r;
     BuildProjectsInfo       = buildProjectsInfo;
     DependencyTable         = t;
     Solutions           = solutions;
     PackageDependencies = t.Where(row => row.Origin != null)
                           .SelectMany(row => row.GetReferences().Select(pR => new LocalPackageDependency(row, pR, _index)))
                           .ToArray();
     for (int i = solutions.Count - 1; i >= 0; --i)
     {
         solutions[i].Initialize(this);
     }
 }