Class DebounceDispatcher

Provides Debounce() and Throttle() methods. Use these methods to ensure that events aren't handled too frequently.

Throttle() ensures that events are throttled by the interval specified. Only the last event in the interval sequence of events fires.

Debounce() fires an event only after the specified interval has passed in which no other pending event has fired. Only the last event in the sequence is fired.

More info:

public class DebounceDispatcher : object

Class Members




Debounce an event by resetting the event timeout every time the event is fired. The behavior is that the Action passed is fired only after events stop firing for the given timeout period.

public void Debounce(int interval,     Action action,     object param,     DispatcherPriority priority,     Dispatcher disp)


This method throttles events by allowing only 1 event to fire for the given timeout period. Only the last event fired is handled - all others are ignored. Throttle will fire events every timeout ms even if additional events are pending.

public void Throttle(int interval,     Action action,     object param,     DispatcherPriority priority,     Dispatcher disp)


Namespace: MarkdownMonster.Windows
Assembly: markdownmonster.exe

© West Wind Technologies, 2016-2024 • Updated: 11/23/21
Comment or report problem with topic