Click or drag to resize

Throttle Class

Implements a simple timed throttle.

Calling Tick multiple times will restart the timer; there will be one single call to the action when the delay time has elapsed after the last tick.

Inheritance Hierarchy
SystemObject
  TomsToolbox.DesktopThrottle

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 1.0.74.0
Syntax
public class Throttle

The Throttle type exposes the following members.

Constructors
  NameDescription
Public methodThrottle(Action)
Initializes a new instance of the Throttle class with a default timeout of 100ms.
Public methodThrottle(TimeSpan, Action)
Initializes a new instance of the Throttle class.
Top
Methods
  NameDescription
Public methodTick
Ticks this instance to trigger the throttle.
Top
Extension Methods
  NameDescription
Public Extension MethodSafeCastT
Performs a cast from object to T, avoiding possible null violations if T is a value type.

[CanBeNull]

(Defined by ObjectExtensions.)
Top
See Also