Class Delayer
Makes sure a method is always called 'MillisecondsToDelay' after the previous call.
Inherited Members
Namespace: Mapsui.Fetcher
Assembly: Mapsui.dll
Syntax
public class Delayer
Constructors
| Edit this page View SourceDelayer()
Declaration
public Delayer()
Methods
| Edit this page View SourceExecuteDelayed(Action, int, int)
Schedules the specified action to be executed after a minimum delay,
ensuring that at least delayBetweenCalls milliseconds have elapsed since the previous execution.
If multiple calls are made in quick succession, only the most recent is executed.
Declaration
public void ExecuteDelayed(Action action, int delayBetweenCalls, int minimumDelay)
Parameters
| Type | Name | Description |
|---|---|---|
| Action | action | The action to execute. |
| int | delayBetweenCalls | The minimum number of milliseconds between two executions. |
| int | minimumDelay | The minimum number of milliseconds to wait after calling this method before executing
|
ExecuteDelayed(Func<Task>, int, int)
Schedules the specified asynchronous function to be executed after a minimum delay,
ensuring that at least delayBetweenCalls milliseconds have elapsed since the previous execution.
If multiple calls are made in quick succession, only the most recent is executed.
Declaration
public void ExecuteDelayed(Func<Task> func, int delayBetweenCalls, int minimumDelay)
Parameters
| Type | Name | Description |
|---|---|---|
| Func<Task> | func | The asynchronous function to execute. |
| int | delayBetweenCalls | The minimum number of milliseconds between two executions. |
| int | minimumDelay | The minimum number of milliseconds to wait after calling this method before executing
|