Class ThreadsafeCounter<T>
- Namespace
- Support
- Assembly
- Support.dll
A thread save container that can be used to count things.
public class ThreadsafeCounter<T> where T : notnull
Type Parameters
T
The things that can be counted.
- Inheritance
-
ThreadsafeCounter<T>
- Inherited Members
- Extension Methods
Constructors
ThreadsafeCounter(IEqualityComparer<T>)
public ThreadsafeCounter(IEqualityComparer<T> comparer)
Parameters
comparer
IEqualityComparer<T>
Properties
this[T]
public int this[T item] { get; }
Parameters
item
T
Property Value
Keys
public IEnumerable<T> Keys { get; }
Property Value
- IEnumerable<T>
Methods
Add(T)
public void Add(T item)
Parameters
item
T
Clear()
public void Clear()
GetCount(T)
public int GetCount(T item)
Parameters
item
T
Returns
ToString()
Returns a string that represents the current object.
public override string ToString()
Returns
- string
A string that represents the current object.