GlobalNamespace GetGlobalNamespace() { INamespace ns = _global; GlobalNamespace globals = ns as GlobalNamespace; while (globals == null && ns != null) { ns = ns.ParentNamespace; globals = ns as GlobalNamespace; } return(globals); }
NamespaceEntity GetTopLevelNamespace(string topLevelName) { GlobalNamespace globalNS = GetGlobalNamespace(); if (globalNS == null) { return(null); } NamespaceEntity entity = (NamespaceEntity)globalNS.GetChild(topLevelName); if (null == entity) { entity = new NamespaceEntity(null, _context.TypeSystemServices, topLevelName); globalNS.SetChild(topLevelName, entity); } return(entity); }