예제 #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>());
 }
 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>());
 }
예제 #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>();
 }
예제 #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;
        }
예제 #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;
        }
예제 #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>();
 }
예제 #7
0
 public bool IsDescendantOf(FileSystemPath source)
 {
     return Parent.StartsWith(source.ToString());
 }
예제 #8
0
 public bool IsDescendantOf(FileSystemPath source)
 {
     return(Parent.StartsWith(source.ToString()));
 }