public void Start() { if (PackTimer is null) { PackTimer = new Timer(x => { Due?.Invoke(); if (Repeat is { } && --Repeat <= 0) { Dispose(); } }, null, TimeSpan.Zero, Interval);
protected virtual void OnDue() { Due?.Invoke(this, EventArgs.Empty); }
public void Start() { if (PackTimer is null) { PackTimer = new Timer(x => { Due?.Invoke(); if (Repeat is { } && --Repeat <= 0) { Dispose(); } }, null, TimeSpan.Zero, Interval);
protected virtual void OnDue() { Due?.Invoke(this, EventArgs.Empty); }