/// <summary> /// Gets a name in this namespace from string. /// </summary> internal XName GetName(string localName) { var name = names.TryGet(localName); if (name != null) return name; name = names.Add(localName, new XName(localName, this)); return name; }
/// <summary> /// Gets a namespace name from string. /// </summary> public static XNamespace Get(string namespaceName) { if ((namespaceName == null) || (namespaceName.Length == 0)) return None; var ns = map.TryGet(namespaceName); if (ns != null) return ns; ns = map.Add(namespaceName, new XNamespace(namespaceName)); return ns; }