Exemplo n.º 1
0
        /// <summary>
        /// Event start
        /// </summary>
        /// <param name="seconds">Start parameter</param>
        public void SimulateTimeOut(int seconds)
        {
            Countdown.Start(seconds);
            var e = new NewTimeOutEventArgs(seconds);

            OnNewTimeOut(e);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Method for event execution
        /// </summary>
        /// <param name="e">Exemplar of class wiht additional ingo</param>
        protected virtual void OnNewTimeOut(NewTimeOutEventArgs e)
        {
            var temp = NewTimeOut;

            temp?.Invoke(this, e);
        }
 private void FirstSubscriberMsg(object sender, NewTimeOutEventArgs e)
 {
     Console.WriteLine("RED");
 }