Ejemplo n.º 1
0
        public bool WasAlreadyTested([NotNull] IFeature feature,
                                     [NotNull] ContainerTest containerTest)
        {
            TestedRow testedRow = GetTestedRow(feature);

            return(testedRow != null && testedRow.WasTestedFor(containerTest));
        }
Ejemplo n.º 2
0
        private void RemoveObsoleteRows(IDictionary <BaseRow, TestedRow> testedRows,
                                        [NotNull] IBox searchBox)
        {
            List <BaseRow> toBeRemoved = null;

            foreach (KeyValuePair <BaseRow, TestedRow> pair in testedRows)
            {
                BaseRow   baseRow   = pair.Key;
                TestedRow testedRow = pair.Value;

                if (!testedRow.HasNoRemainingOccurrence(searchBox))
                {
                    ValidateCache(baseRow, searchBox);

                    continue;
                }

                if (toBeRemoved == null)
                {
                    toBeRemoved = new List <BaseRow>();
                }

                toBeRemoved.Add(baseRow);
            }

            if (toBeRemoved != null)
            {
                foreach (BaseRow oidToRemove in toBeRemoved)
                {
                    testedRows.Remove(oidToRemove);

                    oidToRemove.UniqueId?.Drop();
                }
            }
        }