Class TimedUpdateRegistration
Represents a registration for a timed plugin update
Implements
Namespace: Artemis.Core
Assembly: Artemis.Core.dll
Syntax
public sealed class TimedUpdateRegistration : IDisposable
Properties
Action
Gets the action that gets called each time the update event fires
Declaration
public Action<double>? Action { get; }
Property Value
Type | Description |
---|---|
Action<double> |
AsyncAction
Gets the task that gets called each time the update event fires
Declaration
public Func<double, Task>? AsyncAction { get; }
Property Value
Type | Description |
---|---|
Func<double, Task> |
Feature
Gets the plugin feature this registration is associated with
Declaration
public PluginFeature Feature { get; }
Property Value
Type | Description |
---|---|
PluginFeature |
Interval
Gets the interval at which the update should occur
Declaration
public TimeSpan Interval { get; }
Property Value
Type | Description |
---|---|
TimeSpan |
Name
Gets the name of this timed update
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
string |
Methods
Dispose()
Declaration
public void Dispose()
Start()
Starts calling the Action or AsyncAction at the configured Interval
Note: Called automatically when the plugin enables
Declaration
public void Start()
Stop()
Stops calling the Action or AsyncAction at the configured Interval
Note: Called automatically when the plugin disables
Declaration
public void Stop()
ToString()
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
string |