using System; namespace RGB.NET.Core; /// /// Represents a generic update trigger. /// public abstract class AbstractUpdateTrigger : AbstractBindable, IUpdateTrigger { #region Properties & Fields /// public abstract double LastUpdateTime { get; protected set; } #endregion #region Events /// public event EventHandler? Starting; /// public event EventHandler? Update; #endregion #region Methods /// /// Invokes the -event. /// /// Optional custom-data passed to the subscribers of the .event. protected virtual void OnStartup(CustomUpdateData? updateData = null) => Starting?.Invoke(this, updateData ?? CustomUpdateData.Empty); /// /// Invokes the -event. /// /// Optional custom-data passed to the subscribers of the .event. protected virtual void OnUpdate(CustomUpdateData? updateData = null) => Update?.Invoke(this, updateData ?? CustomUpdateData.Empty); /// public abstract void Start(); /// public abstract void Dispose(); #endregion }