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.WpfDispatcherThrottle

Namespace: TomsToolbox.Wpf
Assembly: TomsToolbox.Wpf (in TomsToolbox.Wpf.dll) Version: 2.21.0+44d18b541fc9419ec3c549350a832394661b2a4d
XMLNS for XAML: Not mapped to an xmlns.
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
 NameDescription
Public Extension MethodSafeCastT Performs a cast from object to T, avoiding possible null violations if T is a value type.
(Defined by ObjectExtensions)
Top
See Also