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>()); }
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>(); }
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; }
private IEnumerable<FileSystemItem> FindChildren(FileSystemPath path, ICriterion criterion) { return Session.CreateCriteria<FileSystemItem>() .Add(Restrictions.Eq("Path.Parent", path.ToString())) .Add(criterion) .List<FileSystemItem>(); }
public bool IsDescendantOf(FileSystemPath source) { return Parent.StartsWith(source.ToString()); }
public bool IsDescendantOf(FileSystemPath source) { return(Parent.StartsWith(source.ToString())); }