RunOnce Method
Runs a method once, after the specified interval.
Definition
Namespace: Avalonia.Threading
Assembly: Avalonia.Base (in Avalonia.Base.dll)
- C#
- VB
- F#
public static IDisposable RunOnce(
	Action action,
	TimeSpan interval,
	DispatcherPriority priority = default
)
Public Shared Function RunOnce ( 
	action As Action,
	interval As TimeSpan,
	Optional priority As DispatcherPriority = Nothing
) As IDisposable
static member RunOnce : 
        action : Action * 
        interval : TimeSpan * 
        ?priority : DispatcherPriority 
(* Defaults:
        let _priority = defaultArg priority new DispatcherPriority()
*)
-> IDisposable 
Parameters
- Action
- The method to call after the interval has elapsed.
- TimeSpan
- The interval after which to call the method.
- DispatcherPriority (Optional)
- The priority to use.
Return Value
IDisposable
An IDisposable used to cancel the timer.