public ReflectedModule EnsureNamespace(string full, SymbolId name) { ReflectedModule nested; if (!namespaces.TryGetValue(name, out nested)) { nested = new ReflectedModule(full); namespaces[name] = nested; } return(nested); }
private void LoadTypes(Assembly assembly) { Type[] types = assembly.GetExportedTypes(); foreach (Type type in types) { ReflectedModule scope = global; string[] ns = type.Namespace.Split('.'); string full = ""; bool dot = false; foreach (string n in ns) { full = dot ? full + "." + n : n; dot = true; scope = scope.EnsureNamespace(full, SymbolTable.StringToId(n)); } scope.AddType(type); } }
public bool TryGetNamespace(string name, out ReflectedModule scope) { return(namespaces.TryGetValue(SymbolTable.StringToId(name), out scope)); }
public bool TryGetNamespace(string name, out ReflectedModule scope) { return namespaces.TryGetValue(SymbolTable.StringToId(name), out scope); }
public ReflectedModule EnsureNamespace(string full, SymbolId name) { ReflectedModule nested; if (!namespaces.TryGetValue(name, out nested)) { nested = new ReflectedModule(full); namespaces[name] = nested; } return nested; }