private FAMIX.Namespace EnsureNamespace(INamespaceSymbol ns) { if (Namespaces.has(ns.Name)) { return(Namespaces.Named(ns.Name)); } FAMIX.Namespace newNs = repository.New <FAMIX.Namespace>(typeof(FAMIX.Namespace).FullName); newNs.name = ns.Name; newNs.isStub = true; Namespaces.Add(ns.Name, newNs); return(newNs); }
private FAMIX.Namespace EnsureNamespace(INamespaceSymbol ns) { if (Namespaces.has(ns.Name)) { return(Namespaces.Named(ns.Name)); } FAMIX.Namespace newNs = repository.New <FAMIX.Namespace>(typeof(FAMIX.Namespace).FullName); newNs.name = ns.Name; newNs.isStub = true; Namespaces.Add(ns.Name, newNs); var containingNamespace = ns.ContainingNamespace; if (containingNamespace != null && !containingNamespace.IsGlobalNamespace) { newNs.parentScope = EnsureNamespace(containingNamespace); } return(newNs); }
private Namespace CreateNamespace(INamespaceSymbol ns) { FAMIX.Namespace entity = this.CreateNewEntity <FAMIX.Namespace>(typeof(FAMIX.Namespace).FullName); entity.name = ns.Name; return(entity); }