private void AccountBadItem(BadMessageRec item) { switch (item.Kind) { case BadItemKind.MissingItem: this.MissingCount++; break; case BadItemKind.CorruptItem: this.CorruptCount++; break; case BadItemKind.LargeItem: this.LargeCount++; break; default: this.OtherCount++; break; } SkippedItemCounts.CategoryKey key = new SkippedItemCounts.CategoryKey { Kind = item.Kind, Category = item.Category }; int num; if (!this.counts.TryGetValue(key, out num)) { num = 0; } this.counts[key] = num + 1; }
internal CategoryCount(SkippedItemCounts.CategoryKey key, int count) { this.Key = key; this.Count = count; }