Ejemplo n.º 1
0
        private static IEnumerable <ISource> FilesUnder(this IVsProject inProject, DTE dte, VSConstants.VSITEMID id)
        {
            Option <ISource> file = inProject.TryFindFile(dte, id);

            IEnumerable <ISource> result =
                file.OfType <SourceFile>() is Some <SourceFile> some ? new [] { some.Content }.Concat(inProject.GetSourceFiles(some.Content.Dte, some.Content.ItemId))
                : file is Some <ISource> general ? new[] { general.Content }
                : inProject.GetSourceFiles(dte, id);

            return(result);
        }
Ejemplo n.º 2
0
 public static IEnumerable <ISource> GetSourceFiles(this IVsProject project, DTE dte) =>
 project.GetSourceFiles(dte, VSConstants.VSITEMID.Root);