Searching files in a directory for a string
Currently your method does two things. It searches the directory structure and anylizes the files at the same time. This should be separated so that you can maintain each feature separately without affecting the other. For example should you want to search the directories recursively you now only need to change the GetFileNames method without thinking about reading the files.

public static IEnumerable&lt;string&gt; FindLines(this IEnumerable&lt;string&gt; fileNames, Func&lt;string, bool&gt; predicate)
{
    return fileNames.Select(fileName =&gt;
    {
        using (var sr = new StreamReader(fileName))
        {
            var line = string.Empty;
            while ((line = sr.ReadLine()) != null)
            {
                if (predicate(line))
                {
                    return line;
                }
            }
        }
        return null;
    })
    .Where(line =&gt; !string.IsNullOrEmpty(line));
}

public static IEnumerable&lt;string&gt; GetFileNames(this string path)
{
    return 
        Directory.EnumerateDirectories(path)
        .SelectMany(Directory.EnumerateFiles);
}


If you want you can make it parallel later with:

var results = 
    @"c:\foo".GetFileNames()
    .FindLines(line =&gt; line.IndexOf("bar", StringComparison.CurrentCultureIgnoreCase) &gt;= 0)
    .AsParallel()
    .ToList();