Class DeferredUIAction
Executes an action on the UI thread no more frequently than a specified interval, with optional extra delay.
public class DeferredUIAction
- Inheritance
-
DeferredUIAction
- Inherited Members
- Extension Methods
Constructors
DeferredUIAction(Action, TimeSpan, TimeSpan?)
Initializes a new instance of the DeferredUIAction class.
public DeferredUIAction(Action action, TimeSpan minInterval, TimeSpan? delayBy = null)
Parameters
action
ActionThe action to execute.
minInterval
TimeSpanThe minimum time between consecutive executions.
delayBy
TimeSpan?Optional additional delay applied from the last request; must be less than or equal to
minInterval
.
Exceptions
- ArgumentException
Thrown when
delayBy
is greater thanminInterval
.
Properties
IsEnabled
Gets or sets a value indicating whether execution is enabled.
public bool IsEnabled { get; set; }
Property Value
Methods
Execute()
Requests execution of the action honoring throttling constraints; the action will run on the UI thread.
public void Execute()