Exemplo n.º 1
0
        public static Page GetParent(this Page page)
        {
            var parentAbsoluteName = FullNameHelper.GetParentAbsoluteName(page.AbsoluteName);

            if (!string.IsNullOrEmpty(parentAbsoluteName))
            {
                return(new Page(page.Site, parentAbsoluteName));
            }
            return(null);
        }
Exemplo n.º 2
0
 public Site(Site parent, string name)
 {
     this.Name = name;
     if (parent != null)
     {
         this.AbsoluteName = FullNameHelper.Combine(parent.AbsoluteName, name);
     }
     else
     {
         this.AbsoluteName = name;
     }
 }
Exemplo n.º 3
0
 public Site(string fullName)
 {
     this.Name         = FullNameHelper.GetName(fullName);
     this.AbsoluteName = fullName;
 }
Exemplo n.º 4
0
 public Page(Page parent, string name)
 {
     this.Site         = parent.Site;
     this.AbsoluteName = FullNameHelper.Combine(parent.AbsoluteName, name);
     this.Name         = name;
 }
Exemplo n.º 5
0
 public Page(Site site, string fullName)
 {
     this.Site         = site;
     this.AbsoluteName = fullName;
     this.Name         = FullNameHelper.GetName(fullName);
 }