private void OnTimerIsOver(TimerEventArgs e) { this.TimerIsOver(this, e); }
/// <summary> /// Prints messages when event is raised /// </summary> /// <param name="sender">The source of the event</param> /// <param name="e">An object that contains the event data</param> private void TimeHasPassed(object sender, TimerEventArgs e) { Console.WriteLine($"Sender: {sender}"); Console.WriteLine($"Message: {e.Message}"); Console.WriteLine($"{e.Milliseconds} milliseconds passed"); }
protected virtual void OnEvent(object sender, TimerEventArgs e) { this.Event?.Invoke(sender, e); }