Exemplo n.º 1
0
        public bool IsChildOf(ITreeNode inode)
        {
            CacheBinInfo binInfo = inode as CacheBinInfo;

            string binpath = binInfo.path + delimiter;
            int    length  = binpath.Length;

            if (this.path.Length > length &&
                this.path.Substring(0, length) == binpath)
            {
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
 public void RemoveCacheBinNode(LJBinsTree binTree, LJTreeNode binNode)
 {
     if (binNode.Left != null)
     {
         RemoveCacheBinNode(binTree, binNode.Left);
     }
     else
     {
         CacheBinInfo binInfo = binNode.data as CacheBinInfo;
         if (binInfo != null)
         {
             CachingService.Current.Remove(binInfo.CacheKey);
         }
     }
     if (binNode.Right != null)
     {
         RemoveCacheBinNode(binTree, binNode.Right);
     }
     binTree.Delete(binNode.data);
 }
Exemplo n.º 3
0
        public int CompareTo(ITreeNode inode)
        {
            CacheBinInfo binInfo = inode as CacheBinInfo;

            return(path.CompareTo(binInfo.path));
        }