Exemple #1
0
        public ICollection <RowKey> GetPivotValues(IdentifierPath identifierPath)
        {
            var deepestId = IdentifierPath.Root;
            ICollection <RowKey> deepestResult = null;

            foreach (var entry in _pivotValues)
            {
                if (entry.Key.Length > deepestId.Length && identifierPath.StartsWith(entry.Key))
                {
                    deepestResult = entry.Value;
                }
            }
            return(deepestResult);
        }
Exemple #2
0
        public IEnumerable <RowNode> GetDescendants(IdentifierPath identifierPath)
        {
            var result = new List <RowNode>();

            foreach (var entry in _children)
            {
                if (!identifierPath.StartsWith(entry.Key))
                {
                    continue;
                }

                if (entry.Key.Equals(identifierPath))
                {
                    result.AddRange(entry.Value);
                    continue;
                }
                foreach (var child in entry.Value)
                {
                    result.AddRange(child.GetDescendants(identifierPath));
                }
            }
            return(result);
        }