diff options
Diffstat (limited to 'VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs')
-rw-r--r-- | VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs b/VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs new file mode 100644 index 0000000..1ab679c --- /dev/null +++ b/VNLib.Plugins.Extensions.Loading/Events/IIntervalScheduleable.cs @@ -0,0 +1,21 @@ +using System.Threading; +using System.Threading.Tasks; + +using VNLib.Utils.Logging; + +namespace VNLib.Plugins.Extensions.Loading.Events +{ + /// <summary> + /// Exposes a type for asynchronous event schelueling + /// </summary> + public interface IIntervalScheduleable + { + /// <summary> + /// A method that is called when the interval time has elapsed + /// </summary> + /// <param name="log">The plugin default log provider</param> + /// <param name="cancellationToken">A token that may cancel an operations if the plugin becomes unloaded</param> + /// <returns>A task that resolves when the async operation completes</returns> + Task OnIntervalAsync(ILogProvider log, CancellationToken cancellationToken); + } +} |