/// <summary> /// Gets an ID for a namespace, ensuring that all other dependencies of the namespace /// are themselves registered with IDs. /// </summary> /// <param name="ns">The namespace</param> /// <returns>The ID of the namespace</returns> private int NamespaceID(Namespace ns) { this.stringMarshal.Register(ns.Name); return this.nsMarshal.GetIDFor(ns); }
static Namespace() { Namespace.GlobalNS = new Namespace(NamespaceKind.Ns, "*"); }
internal void SetNamespaces(Namespace[] namespaces) { this.nsConsts = new List<Namespace>(); this.nsConsts.Add(Namespace.GlobalNS); this.nsConsts.AddRange(namespaces); }
internal NamespaceSet CreateNamespaceSet(Namespace[] nsRefs) { NamespaceSet set = new NamespaceSet(nsRefs); this.nsSetConsts.Add(set); return set; }
internal Namespace CreateNamespace(Namespace.NamespaceKind kind, string name, string prefix = null) { Namespace ns = new Namespace(kind, name, prefix); this.nsConsts.Add(ns); return ns; }
internal Multiname CreateMultiname(Multiname.MultinameKind kind, string name, Namespace ns, NamespaceSet set) { Multiname mn = new Multiname(kind, name, ns, set); this.multinameConsts.Add(mn); return mn; }
internal void AddNamespace(Namespace ns) { this.nsConsts.Add(ns); }