Using Roslyn to find interfaces within a solution
Name captured variables as you would name local variables.
First SelectMany and Select can be merged into a single SelectMany.


code: 

public async Task&lt;IImmutableList&lt;ISymbol&gt;&gt; GetMatchingInterfacesInSolution(string solutionPath, Func&lt;string, bool&gt; predicate)
{
    var workspace = MSBuildWorkspace.Create();
    var solution = await workspace.OpenSolutionAsync(solutionPath);
    var compilations = await Task.WhenAll(solution.Projects.Select(x =&gt; x.GetCompilationAsync()));

    return compilations
        .SelectMany(compilation =&gt; compilation.SyntaxTrees.Select(syntaxTree =&gt; compilation.GetSemanticModel(syntaxTree)))
        .SelectMany(
            semanticModel =&gt; semanticModel
                .SyntaxTree
                .GetRoot()
                .DescendantNodes()
                .OfType&lt;InterfaceDeclarationSyntax&gt;()
                .Select(interfaceDeclarationSyntax =&gt; semanticModel.GetDeclaredSymbol(interfaceDeclarationSyntax)))
        .Where(symbol =&gt; predicate(symbol.ToDisplayString()))
        .ToImmutableList();
}