public bool Add(TestItem item) { Items.Add(item); return Items.Count == mCount; }
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); } } }