Esempio n. 1
0
 public bool Add(TestItem item)
 {
     Items.Add(item);
     return Items.Count == mCount;
 }
Esempio n. 2
0
        private void Completed(TestItem item)
        {
            lock (mTestedItems)
            {
                if (mMinDelay == -1 || item.UserTime < mMinDelay)
                {
                    mMinDelay = item.UserTime;
                }
                if (item.UserTime > mMaxDelay)
                    mMaxDelay = item.UserTime;

                System.Threading.Interlocked.Increment(ref mTestCount);
                if (item.LastError != null)
                {
                    ErrorItems.Add(item);
                    System.Threading.Interlocked.Increment(ref mErrors);
                }
                else
                {
                    TestedItems.Add(item);
                    System.Threading.Interlocked.Increment(ref mCompeteds);
                }
            }
        }