Class OperationCounter
Provides a container that maintains a count of pending asynchronous operations.
public sealed class OperationCounter
- Inheritance
-
OperationCounter
- Inherited Members
Constructors
OperationCounter()
Initializes a new instance of the OperationCounter class.
public OperationCounter()
Properties
Count
Gets the operation count.
public int Count { get; }
Property Value
- int
The operation count.
Methods
Decrement()
Reduces the operation count by 1.
public int Decrement()
Returns
- int
The updated operation count.
Decrement(int)
Reduces the operation count by the specified value.
public int Decrement(int value)
Parameters
value
intThe number of operations to reduce the count by.
Returns
- int
The updated operation count.
Increment()
Increments the operation count by one.
public int Increment()
Returns
- int
The updated operation count.
Increment(int)
Increments the operation count by the specified value.
public int Increment(int value)
Parameters
value
intThe number of operations to increment the count by.
Returns
- int
The updated operation count.
Events
Completed
Occurs when an asynchronous method completes.
public event EventHandler Completed