Пример #1
0
        public void CompleteTournament()
        {
            if (OnTournamentComplete != null)
            {
                OnTournamentComplete.Invoke(this, DateTime.Now);
            }

            // OnTournamentComplete?.Invoke(this, DateTime.Now);
        }
 public void CompleteTournament()
 {
     OnTournamentComplete?.Invoke(this, DateTime.Now);
 }
Пример #3
0
 // A method to fire off the event
 public void CompleteTournament()
 {
     // Check to see if there is any subscribers
     // Check is this event is available
     OnTournamentComplete?.Invoke(this, DateTime.Now);
 }
Пример #4
0
 //Now we create the method that fires that event
 //We need to check the subscribers, cause id theres no subscriber, we cant fire the event
 public void CompleteTournament()
 {
     OnTournamentComplete?.Invoke(this, DateTime.Now); //If you have a subscriber, fire the event
 }
Пример #5
0
 public void CompleteTournament()
 {
     OnTournamentComplete?.Invoke(this, null);
 }
Пример #6
0
 /// <summary>
 /// Complete the tournament with appropriate message
 /// </summary>
 /// <param name="finalMessage"></param>
 public void CompleteTournament(string finalMessage)
 {
     OnTournamentComplete?.Invoke(this, finalMessage);
 }
Пример #7
0
 public void CompleteTournamentCaller()
 {
     OnTournamentComplete?.Invoke(this, EventArgs.Empty);
 }
Пример #8
0
 // This method fires the OnTournamentComplete event
 public void CompleteTournament()
 {
     // "?" This is a newer c# feature. Checks for subscribers. If there are some, then event can be fired
     OnTournamentComplete?.Invoke(this, DateTime.Now); // This jumps to the eventhandler, that is Tournament_OnTournamentComplete(object sender, DateTime e)
 }
Пример #9
0
 /// <summary>
 /// Invoke the event
 /// </summary>
 public void CompleteTournament()
 {
     // The '?' means if it is available (i.e. there are subscribers to the event) do the extension.
     // If not, don't do anything
     OnTournamentComplete?.Invoke(this, DateTime.Now);
 }