Class Delayer
Makes sure a method is always called 'MillisecondsToDelay' after the previous call.
Implements
Inherited Members
Namespace: Mapsui.Fetcher
Assembly: Mapsui.dll
Syntax
public class Delayer : IDisposable
Constructors
| Edit this page View SourceDelayer()
Declaration
public Delayer()
Properties
| Edit this page View SourceMillisecondsToWait
The delay between two calls.
Declaration
public int MillisecondsToWait { get; set; }
Property Value
Type | Description |
---|---|
int |
StartWithDelay
Declaration
public bool StartWithDelay { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
| Edit this page View SourceDispose()
Declaration
public void Dispose()
Dispose(bool)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
bool | disposing |
ExecuteDelayed(Action)
Executes the method passed as argument with a possible delay. After a previous call the next call is delayed until 'MillisecondsToWait' has passed. When ExecuteRequest is called before the previous delayed action was executed the previous one will be cancelled.
Declaration
public void ExecuteDelayed(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The action to be executed after the possible delay |
Remarks
When the previous call was more than 'MillisecondsToWait' ago there will be no delay.