Ejemplo n.º 1
0
 private IEnumerable <FileSystemItem> FindChildren(FileSystemPath path, ICriterion criterion)
 {
     return(Session.CreateCriteria <FileSystemItem>()
            .Add(Restrictions.Eq("Path.Parent", path.ToString()))
            .Add(criterion)
            .List <FileSystemItem>());
 }
Ejemplo n.º 2
0
 private IEnumerable <FileSystemItem> FindChildren(FileSystemPath path, ICriterion criterion)
 {
     return(Session.CreateCriteria <FileSystemItem>()
            .Add(Restrictions.Eq("Path.Parent", path.ToString()))
            .Add(criterion)
            .AddOrder(Order.Asc("Path.Name"))
            .SetCacheable(true)
            .List <FileSystemItem>());
 }
Ejemplo n.º 3
0
 private IEnumerable<FileSystemItem> FindChildren(FileSystemPath path, ICriterion criterion)
 {
     return Session.CreateCriteria<FileSystemItem>()
         .Add(Restrictions.Eq("Path.Parent", path.ToString()))
         .Add(criterion)
         .AddOrder(Order.Asc("Path.Name"))
         .SetCacheable(true)
         .List<FileSystemItem>();
 }
Ejemplo n.º 4
0
        public void Rebase(FileSystemPath source, FileSystemPath target)
        {
            if (!source.IsDirectory || !target.IsDirectory)
            {
                throw new ApplicationException("Rebase parameters \"source\" and \"target\" should both be directory paths.");
            }

            Parent = new FileSystemPath(target + ToString().Substring(source.ToString().Length)).Parent;
        }
Ejemplo n.º 5
0
        public void Rebase(FileSystemPath source, FileSystemPath target)
        {
            if (!source.IsDirectory || !target.IsDirectory)
            {
                throw new ApplicationException("Rebase parameters \"source\" and \"target\" should both be directory paths.");
            }

            Parent = new FileSystemPath(target + ToString().Substring(source.ToString().Length)).Parent;
        }
Ejemplo n.º 6
0
 private IEnumerable<FileSystemItem> FindChildren(FileSystemPath path, ICriterion criterion)
 {
     return Session.CreateCriteria<FileSystemItem>()
         .Add(Restrictions.Eq("Path.Parent", path.ToString()))
         .Add(criterion)
         .List<FileSystemItem>();
 }
Ejemplo n.º 7
0
 public bool IsDescendantOf(FileSystemPath source)
 {
     return Parent.StartsWith(source.ToString());
 }
Ejemplo n.º 8
0
 public bool IsDescendantOf(FileSystemPath source)
 {
     return(Parent.StartsWith(source.ToString()));
 }