public static IEnumerable <ProjectDependency> FindFiles(ClassNode document, string projectDirectory) { return(document .AllNodesInDocument() .SelectMany( node => Enumerable.Union( node.ReferencePropertiesWithValues.Select(p => p.Source), node.ListPropertiesWithValues.SelectMany(p => p.Sources))) .OfType <BundleFileSource>() .Select(bs => new ProjectDependency( path: bs.Path, descriptor: bs.GetDescriptor(projectDirectory)))); }
static IEnumerable <Node> GlobalNodes(this ClassNode document) { return(document .AllNodesInDocument() .Where(IsGlobalDeclaration)); }