Exemple #1
0
        public override IEnumerable <IEntity> Execute(ExecutionOptions options)
        {
            var visited         = new HashSet <IEntity>(EntityPathEqualityComparer.Default);
            var firstEvaluation = First.Execute(options);

            foreach (var item in firstEvaluation)
            {
                visited.Add(item);
                if (Second.Match(item))
                {
                    yield return(item);
                }
            }

            var secondEvaluation = Second.Execute(options);

            foreach (var item in secondEvaluation)
            {
                if (!visited.Contains(item) && First.Match(item))
                {
                    yield return(item);
                }
            }
        }
Exemple #2
0
 public abstract IEnumerable <IEntity> Execute(ExecutionOptions options);