private static IEnumerable<ISymbol> GetAllSymbolsWorker(SymbolKeyResolution resolution)
        {
            if (resolution.Symbol != null)
            {
                yield return resolution.Symbol;
            }

            foreach (var symbol in resolution.CandidateSymbols)
            {
                yield return symbol;
            }
        }
 private static IEnumerable<INamedTypeSymbol> ResolveErrorTypes(
     SymbolKeyReader reader,
     SymbolKeyResolution containingSymbolResolution, string name, int arity)
 {
     if (containingSymbolResolution.GetAnySymbol() == null)
     {
         yield return reader.Compilation.CreateErrorTypeSymbol(null, name, arity);
     }
     else
     {
         foreach (var container in containingSymbolResolution.GetAllSymbols().OfType<INamespaceOrTypeSymbol>())
         {
             yield return reader.Compilation.CreateErrorTypeSymbol(container, name, arity);
         }
     }
 }