Beispiel #1
0
        public int GetDistinctAffectedItemCount()
        {
            var distinctAffectedItemCalculator = new DistinctAffectedItemCalculator(ListCapacity);

            foreach (IDeclaration <T> declaration in this.queuedDeclarations)
            {
                distinctAffectedItemCalculator.AddRange(declaration.Start, declaration.End, declaration.NumberOfAffectedItems);
            }

            return(distinctAffectedItemCalculator.GetTotal());
        }
Beispiel #2
0
        public int GetDistinctAffectedItemCount()
        {
            var distinctAffectedItemCalculator = new DistinctAffectedItemCalculator(listCapacity);

            for (int i = 0; i < queuedDeclarations.Count; i++)
            {
                distinctAffectedItemCalculator.AddRange(queuedDeclarations[i].Start, queuedDeclarations[i].End, queuedDeclarations[i].NumberOfAffectedItems);
            }

            return(distinctAffectedItemCalculator.GetTotal());
        }
 public void SetUp()
 {
     sut = new DistinctAffectedItemCalculator(5);
 }