Beispiel #1
0
        protected Node(string ownerId, string name, string path, FolderNode parentNode)
        {
            Id      = Guid.NewGuid().ToString("n");
            OwnerId = ownerId;
            Name    = name;
            Path    = path;
            if (parentNode != null)
            {
                parentNode.AddNode(this);
            }

            IsDeleted = false;
        }
Beispiel #2
0
 public abstract Node Clone(FolderNode parentNode, string newName = null);
Beispiel #3
0
 public FolderNode(string ownerId, string name, string path, FolderNode parentNode)
     : base(ownerId, name, path, parentNode)
 {
 }
Beispiel #4
0
 public override Node Clone(FolderNode parentNode, string newName = null)
 {
     return(new FolderNode(parentNode.OwnerId, newName ?? Name, Path, parentNode));
 }
Beispiel #5
0
 public bool IsParentOf(FolderNode another)
 {
     return(another.OwnerId == this.OwnerId &&
            another.Path.StartsWith(this.Path) &&
            this.Depth > another.Depth);
 }