private Location CreateModuleLocation( SymbolKeyResolution assembly, string moduleName) { var symbol = assembly.GetAnySymbol() as IAssemblySymbol; Debug.Assert(symbol != null); var module = symbol.Modules.FirstOrDefault(m => m.MetadataName == moduleName); return(module.Locations.FirstOrDefault()); }
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); } } }
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)); } } }