DebounceExtensions Class
Provides extension methods to debounce Action delegates so that they are only invoked after a specified interval has elapsed without a new call.
public static class DebounceExtensionsMethods
| Name | Description |
|---|---|
| Debounce(Action, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce(Action, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce(Action, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0>(Action<T0>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0>(Action<T0>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0>(Action<T0>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1>(Action<T0, T1>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1>(Action<T0, T1>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1>(Action<T0, T1>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan, TimeProvider) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
| Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan, TimeProvider, Action<Exception>?) | Wraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed. |
Debounce overloads
Debounce(Action, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
Parameters
actionAction- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce(Action, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action Debounce(this Action action, TimeSpan interval, TimeProvider timeProvider)Parameters
actionAction- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce(Action, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action Debounce(this Action action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Parameters
actionAction- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0>(Action<T0>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
Type parameters
T0- The type of the parameter 0 of the action.
Parameters
actionAction<T0>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0>(Action<T0>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0> Debounce<T0>(this Action<T0> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
Parameters
actionAction<T0>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0>(Action<T0>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0> Debounce<T0>(this Action<T0> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
Parameters
actionAction<T0>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1>(Action<T0, T1>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
Parameters
actionAction<T0, T1>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1>(Action<T0, T1>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1> Debounce<T0, T1>(this Action<T0, T1> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
Parameters
actionAction<T0, T1>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1>(Action<T0, T1>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1> Debounce<T0, T1>(this Action<T0, T1> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
Parameters
actionAction<T0, T1>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2> Debounce<T0, T1, T2>(this Action<T0, T1, T2> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
Parameters
actionAction<T0, T1, T2>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2> Debounce<T0, T1, T2>(this Action<T0, T1, T2> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
Parameters
actionAction<T0, T1, T2>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2>(Action<T0, T1, T2>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2> Debounce<T0, T1, T2>(this Action<T0, T1, T2> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
Parameters
actionAction<T0, T1, T2>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3> Debounce<T0, T1, T2, T3>(this Action<T0, T1, T2, T3> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
Parameters
actionAction<T0, T1, T2, T3>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3> Debounce<T0, T1, T2, T3>(this Action<T0, T1, T2, T3> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
Parameters
actionAction<T0, T1, T2, T3>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3>(Action<T0, T1, T2, T3>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3> Debounce<T0, T1, T2, T3>(this Action<T0, T1, T2, T3> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
Parameters
actionAction<T0, T1, T2, T3>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4> Debounce<T0, T1, T2, T3, T4>(this Action<T0, T1, T2, T3, T4> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3, T4> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4> Debounce<T0, T1, T2, T3, T4>(this Action<T0, T1, T2, T3, T4> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3, T4> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4>(Action<T0, T1, T2, T3, T4>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4> Debounce<T0, T1, T2, T3, T4>(this Action<T0, T1, T2, T3, T4> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3, T4> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5> Debounce<T0, T1, T2, T3, T4, T5>(this Action<T0, T1, T2, T3, T4, T5> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3, T4, T5> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5> Debounce<T0, T1, T2, T3, T4, T5>(this Action<T0, T1, T2, T3, T4, T5> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3, T4, T5> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5>(Action<T0, T1, T2, T3, T4, T5>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5> Debounce<T0, T1, T2, T3, T4, T5>(this Action<T0, T1, T2, T3, T4, T5> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3, T4, T5> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6> Debounce<T0, T1, T2, T3, T4, T5, T6>(this Action<T0, T1, T2, T3, T4, T5, T6> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3, T4, T5, T6> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6> Debounce<T0, T1, T2, T3, T4, T5, T6>(this Action<T0, T1, T2, T3, T4, T5, T6> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3, T4, T5, T6> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6>(Action<T0, T1, T2, T3, T4, T5, T6>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6> Debounce<T0, T1, T2, T3, T4, T5, T6>(this Action<T0, T1, T2, T3, T4, T5, T6> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3, T4, T5, T6> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7> Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(this Action<T0, T1, T2, T3, T4, T5, T6, T7> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7> Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(this Action<T0, T1, T2, T3, T4, T5, T6, T7> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(Action<T0, T1, T2, T3, T4, T5, T6, T7>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7> Debounce<T0, T1, T2, T3, T4, T5, T6, T7>(this Action<T0, T1, T2, T3, T4, T5, T6, T7> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> action, TimeSpan interval)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
T8- The type of the parameter 8 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7, T8>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan, TimeProvider)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> action, TimeSpan interval, TimeProvider timeProvider)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
T8- The type of the parameter 8 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7, T8>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.
Remarks
An exception thrown by action is unhandled and terminates the process, as for any timer callback. Use the overload that takes an error handler to handle it.
Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(Action<T0, T1, T2, T3, T4, T5, T6, T7, T8>, TimeSpan, TimeProvider, Action<Exception>?)
DebounceExtensions.csWraps the specified action so that it is only invoked once interval has elapsed since the last call. If the returned delegate is called again before the interval elapses, the timer is reset and only the most recent call is executed.
public static Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> Debounce<T0, T1, T2, T3, T4, T5, T6, T7, T8>(this Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> action, TimeSpan interval, TimeProvider timeProvider, Action<Exception>? onError)Type parameters
T0- The type of the parameter 0 of the action.
T1- The type of the parameter 1 of the action.
T2- The type of the parameter 2 of the action.
T3- The type of the parameter 3 of the action.
T4- The type of the parameter 4 of the action.
T5- The type of the parameter 5 of the action.
T6- The type of the parameter 6 of the action.
T7- The type of the parameter 7 of the action.
T8- The type of the parameter 8 of the action.
Parameters
actionAction<T0, T1, T2, T3, T4, T5, T6, T7, T8>- The action to debounce.
intervalTimeSpan- The amount of time to wait after the last call before invoking
action. timeProviderTimeProvider- The
TimeProviderused to measure theinterval. onErrorAction<Exception>?- Called with the exception thrown by
action. Whennull, the exception is unhandled and terminates the process, as for any timer callback.
Returns
Action<T0, T1, T2, T3, T4, T5, T6, T7, T8> A debounced delegate that wraps action.
Exceptions
ArgumentNullExceptionactionortimeProviderisnull.