Ejemplo n.º 1
0
        private bool Add(TJsonPathExpression jsonPath, Dictionary <JsonPathElement, JsonPathExpressionMatchingNode <TJsonPathExpression> > nodes)
        {
            var element = jsonPath.Elements[Index];

            if (!nodes.TryGetValue(element, out var node))
            {
                node = new JsonPathExpressionMatchingNode <TJsonPathExpression>(Index + 1);
                nodes.Add(element, node);
            }

            return(node.Add(jsonPath));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Create <see cref="JsonPathExpressionMatchingSet{TJsonPathExpression}"/> instance
 /// </summary>
 public JsonPathExpressionMatchingSet()
 {
     _hashSet      = new HashSet <TJsonPathExpression>();
     _matchingNode = new JsonPathExpressionMatchingNode <TJsonPathExpression>(0);
 }