Exemplo n.º 1
0
 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);
         }
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        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);
        }