void GetReferencedProjects(CombineEntryCollection referenced, Project project) { if (referenced.Contains (project)) return; if (NeedsBuilding) referenced.Add (project); foreach (ProjectReference pref in project.ProjectReferences) { if (pref.ReferenceType == ReferenceType.Project) { Combine c = project.RootCombine; if (c != null) { Project rp = c.FindProject (pref.Reference); if (rp != null) GetReferencedProjects (referenced, rp); } } } }
void GetAllBuildableEntries(CombineEntryCollection list, string configuration) { CombineConfiguration conf = (CombineConfiguration) GetConfiguration (configuration); if (conf == null) return; foreach (CombineConfigurationEntry entry in conf.Entries) { if (!entry.Build) continue; if (entry.Entry is Combine) ((Combine)entry.Entry).GetAllBuildableEntries (list, configuration); else if (entry.Entry is Project) list.Add (entry.Entry); } }
void GetAllProjects(CombineEntryCollection list) { foreach (CombineEntry entry in Entries) { if (entry is Project) { list.Add (entry); } else if (entry is Combine) { ((Combine)entry).GetAllProjects (list); } } }
static void Insert(int index, CombineEntryCollection allProjects, CombineEntryCollection sortedEntries, bool[] inserted, bool[] triedToInsert) { if (triedToInsert[index]) { throw new CyclicBuildOrderException(); } triedToInsert[index] = true; foreach (ProjectReference reference in ((Project)allProjects[index]).ProjectReferences) { if (reference.ReferenceType == ReferenceType.Project) { int j = 0; for (; j < allProjects.Count; ++j) { if (reference.Reference == ((Project)allProjects[j]).Name) { if (!inserted[j]) { Insert(j, allProjects, sortedEntries, inserted, triedToInsert); } break; } } } } sortedEntries.Add(allProjects[index]); inserted[index] = true; }