public static IEnumerable <BuildObject> getBeatFlavoredShallowIncludes( IContextGeneratingVerb contextVerb, BuildObject rootObj, BeatIncludes.ImportFilter importFilter) { return(getBeatFlavoredShallowIncludesLabeled(contextVerb, rootObj) .Where(li => importFilter == BeatIncludes.ImportFilter.ForBasmOnly || li.importFilter == BeatIncludes.ImportFilter.ForBeatOrBasm) .Select(li => li.buildObject)); }
//- This used to use a BeatTransitiveDepsVerb, but we're going with shallow dependencies at the moment. //- We may want to restore that behavior later, if we can get some sane transitive dep tree worked out for //- Verve code. //- The returned list belongs to the caller to .Add() to as desired. //- TODO this really needs to be factored to supply the actual Beat-flavored references separately //- from the auxiliary deps (transitive dep objects and context dep objects), so we don't have //- client code trying to filter back out the part it wants. Brittle. public static OrderPreservingSet <BuildObject> getBeatFlavoredShallowDependencies( IContextGeneratingVerb contextVerb, BuildObject rootObj, out DependencyDisposition ddisp, BeatIncludes.ImportFilter filter) { OrderPreservingSet <BuildObject> result = new OrderPreservingSet <BuildObject>(); result.Add(contextVerb.getContextOutput()); try { result.AddRange(getBeatFlavoredShallowIncludes(contextVerb, rootObj, filter)); ddisp = DependencyDisposition.Complete; } catch (ObjNotReadyException) { ddisp = DependencyDisposition.Incomplete; } catch (ObjFailedException) { ddisp = DependencyDisposition.Failed; } result.Add(rootObj); //- root really needs to go at the end of the list. return(result); }