Exemple #1
0
        private bool DataNodesMatchesFilter(List <DataNode> nodes, SearchFilter filter)
        {
            if (nodes == null || nodes.Count < 1)
            {
                return(false);
            }

            if (nodes.Exists(n => n.Key.Equals(filter.Field)))
            {
                List <DataNode> fieldMatchNodes = nodes.Where(n => n.Key.Equals(filter.Field)).ToList();

                foreach (DataNode node in fieldMatchNodes)
                {
                    if (filter.EvaluateValue(node.Data))
                    {
                        return(true);
                    }
                }
            }

            return(false);
        }