Click or drag to resize

DispatcherThrottle Class

Implements a simple throttle that uses the dispatcher to delay the target action.

Calling Tick multiple times will result in on single call to the action as soon as the dispatcher of the thread that created the throttle is dispatching calls of the specified priority.

Inheritance Hierarchy
SystemObject
  TomsToolbox.DesktopDispatcherThrottle

Namespace:  TomsToolbox.Desktop
Assembly:  TomsToolbox.Desktop (in TomsToolbox.Desktop.dll) Version: 1.0.64.0 (1.0.64.0)
Syntax
public class DispatcherThrottle

The DispatcherThrottle type exposes the following members.

Constructors
  NameDescription
Public methodDispatcherThrottle(Action)
Initializes a new instance of the DispatcherThrottle class.
Public methodDispatcherThrottle(DispatcherPriority, Action)
Initializes a new instance of the DispatcherThrottle class.
Top
Methods
  NameDescription
Public methodTick
Ticks this instance to trigger the throttle.
Top
Extension Methods
Contracts
Invariants
_target != null
_dispatcher != null
Learn more about contracts
See Also