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)); }
/// <summary> /// Create <see cref="JsonPathExpressionMatchingSet{TJsonPathExpression}"/> instance /// </summary> public JsonPathExpressionMatchingSet() { _hashSet = new HashSet <TJsonPathExpression>(); _matchingNode = new JsonPathExpressionMatchingNode <TJsonPathExpression>(0); }