private CsProj[] GetCsProjs() { if (_csProjsCache == null) { var dir = Path.GetDirectoryName(Filepath); _csProjsCache = new Librarian(_csProjPattern, Text) .Get("capturegroup") .Select(csProjRelPath => Path.Combine(dir, csProjRelPath)) .Where(File.Exists) .Select(file => CsProj.Get(file)) .ToArray(); } return(_csProjsCache); }
public static IEnumerable <CsProj> GetCsProjFiles(string dir) { return(Directory.EnumerateFiles(dir, "*.csproj", SearchOption.AllDirectories) .Select(file => CsProj.Get(file))); }