ActionExt.Loop Method
Executes repeatedly this Action, in the main thread, at rate until cancellation is requested with ct.
Namespace: UltimateXR.Extensions.System.Threading
Assembly: UltimateXR (in UltimateXR.dll) Version: 0.0.0.0
Syntax
C#
public static void Loop(
this Action self,
float rate = 10f,
CancellationToken ct = default
)
Parameters
- self
- Type: System.Action
Action to loop at rate Hz - rate (Optional)
- Type: System.Single
Loop frequency in Hz - ct (Optional)
- Type: System.Threading.CancellationToken
Cancellation token
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type Action. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also
Reference
ActionExt Class
UltimateXR.Extensions.System.Threading Namespace
ActionExt.LoopThreaded(Action, Single, CancellationToken)
ActionExt.ToLoop(Action, Single, Int32)