Beispiel #1
0
 /// <summary>
 /// Method to run an event.
 /// </summary>
 /// <param name="sender">Sender of event.</param>
 /// <param name="info">Additional information about event.</param>
 public void OnClockWorking(object sender, TimeEventArgs info)
 {
     ClockWorking?.Invoke(this, info);
 }
 /// <summary>
 /// Event handler.
 /// </summary>
 /// <param name="sender">Sender of event.</param>
 /// <param name="info">Additional information about event.</param>
 protected abstract void MessageHandler(object sender, TimeEventArgs info);
 /// <summary>
 /// Event handler.
 /// </summary>
 /// <param name="sender">Sender of event.</param>
 /// <param name="info">Additional information about event.</param>
 protected override void MessageHandler(object sender, TimeEventArgs info)
 {
     Console.WriteLine($"We started at {info.Start} and spent {info.Milliseconds / (double)1000} seconds.");
 }