Beispiel #1
0
        public DocNamespace GetNamespace(IEnumerable <string> namespaces)
        {
            string first = namespaces.FirstOrDefault();

            if (first == null)
            {
                return(this);
            }
            else
            {
                DocNamespace ns = null;
                if (!this.Namespaces.TryGetValue(first, out ns))
                {
                    ns = new DocNamespace()
                    {
                        Name = first
                    };
                    this.Namespaces.Add(ns.Name, ns);
                }
                return(ns.GetNamespace(namespaces.Skip(1)));
            }
        }
Beispiel #2
0
 public DocNamespace GetNamespace(IEnumerable<string> namespaces)
 {
     string first = namespaces.FirstOrDefault();
     if (first == null)
     {
         return this;
     }
     else
     {
         DocNamespace ns = null;
         if (!this.Namespaces.TryGetValue(first, out ns))
         {
             ns = new DocNamespace() { Name = first };
             this.Namespaces.Add(ns.Name, ns);
         }
         return ns.GetNamespace(namespaces.Skip(1));
     }
 }