protected virtual bool IsContainedInShortcut(INodeAddress address) { INodeAddress tempAddress; if (address.IsRoot) { return(false); } if (this.shortcutAddresses.Count == 0) { return(false); } var addressKey = address; if (this.shortcutAddresses.TryGetValue(addressKey, out tempAddress)) { return(true); } foreach (var jumpPointAddress in this.shortcutAddresses.Values) { if (address.Depth < jumpPointAddress.Depth) { break; } if (jumpPointAddress.IsRoot) { continue; } var jumpPointParentAddress = jumpPointAddress.Parent; if (jumpPointParentAddress.AbsolutePath != address.PathToDepth(jumpPointParentAddress.Depth)) { continue; } if (address.IsDescendentOf(jumpPointAddress, StringComparison.CurrentCultureIgnoreCase, AddressScope.DescendentOrSelf)) { return(true); } } return(false); }
public virtual bool IsAncestorOf(INodeAddress name) { return name.IsDescendentOf(this, AddressScope.Descendent); }
public virtual bool IsAncestorOf(INodeAddress name) { return(name.IsDescendentOf(this, AddressScope.Descendent)); }