Beispiel #1
0
        public void Rebase(Path source, Path target)
        {
            if (!source._isDirectory || !target._isDirectory)
            {
                throw new ApplicationException("Rebase parameters \"source\" and \"target\" should both be directory paths.");
            }

            Parent = new Path(target + ToString().Substring(source.ToString().Length)).Parent;
        }
Beispiel #2
0
 private IEnumerable<FileSystemItem> FindChildren(Path path, ICriterion criterion)
 {
     return _sessionProvider.OpenSession.Session
         .CreateCriteria<FileSystemItem>()
         .Add(Restrictions.Eq("Path.Parent", path.ToString()))
         .Add(criterion)
         .List<FileSystemItem>();
 }
Beispiel #3
0
 public bool IsDescendantOf(Path source)
 {
     return Parent.StartsWith(source.ToString());
 }