public void VerifyNoMissingSymbols() { if (ImportedType != null && !ImportMissingDone) { ImportMissingDone = true; var names = ImportedType.GetMembers(Runtime.ImportBindingFlags).Select(x => x.Name).Distinct().ToArray(); foreach (var name in names) { Runtime.ImportMissingSymbol(name, this); } } }
public Symbol FindExported(string key, bool useMissing = false) { if (IsExported(key)) { return(FindInternal(key)); } else if (useMissing && ImportedType != null) { Runtime.ImportMissingSymbol(key, this); if (IsExported(key)) { return(FindInternal(key)); } } return(null); }
public Symbol FindInternal(string key, bool useMissing = false) { Symbol sym; if (Dict.TryGetValue(key, out sym)) { return(sym); } else if (useMissing && ImportedType != null && !ImportMissingDone) { Runtime.ImportMissingSymbol(key, this); if (Dict.TryGetValue(key, out sym)) { return(sym); } } return(null); }