Class DebouncedEventArgs<TData>
Provides data for the Debounced event.
public class DebouncedEventArgs<TData> : DebouncedEventArgs
Type Parameters
TData
- Inheritance
-
DebouncedEventArgs<TData>
- Inherited Members
Constructors
DebouncedEventArgs(long, IReadOnlyList<TData>)
Initializes a new instance of the DebouncedEventArgs<TData> class.
public DebouncedEventArgs(long count, IReadOnlyList<TData> triggerData)
Parameters
countlong- The number of triggers accumulated since the previous event was sent.
Must be greater than 0.
Both Trigger() and Trigger(TData) add to the count. triggerDataIReadOnlyList<TData>Accumulated data from each call to Trigger(TData).
Exceptions
- ArgumentOutOfRangeException
Thrown when
countis not greater than 0. Thrown whentriggerDatahas more thancountitems.
DebouncedEventArgs(long, IReadOnlyList<TData>, bool)
Initializes a new instance of the DebouncedEventArgs<TData> class.
protected DebouncedEventArgs(long count, IReadOnlyList<TData> triggerData, bool boundsCheck)
Parameters
countlong-
The number of triggers accumulated since the previous event was sent.
Must be greater than 0.
Both Trigger() and Trigger(TData) add to the count. triggerDataIReadOnlyList<TData>- Accumulated data from each call to Trigger(TData).
boundsCheckbool- If
false, the parameters are not checked to be within their valid range.
Exceptions
- ArgumentOutOfRangeException
Thrown when count is not greater than 0. Thrown when triggerData has more than count items.
This exception is not thrown if
boundsCheckis false.
Properties
TriggerData
List of data accumulated in this buffered event.
Note that the trigger data is shared with all event listeners and that besides the list itself (which is read only), the data within the list should probably also not be altered.
public IReadOnlyList<TData> TriggerData { get; }
Property Value
- IReadOnlyList<TData>