コード例 #1
0
 /// <summary>
 /// Sends message when fall specified number.
 /// </summary>
 /// <param name="sender">The roulette that generated event.</param>
 /// <param name="rouletteSpinEventArgs">The roulette spin args.</param>
 private void SendMessageOnRouletteSpin(object sender, RouletteSpinEventArgs rouletteSpinEventArgs)
 {
     if (rouletteSpinEventArgs.Number == Number)
     {
         _messageSender.Send($"Ball fell on {Number}.");
     }
 }
コード例 #2
0
 /// <summary>
 /// Sends message when fall black number.
 /// </summary>
 /// <param name="sender">The roulette that generated event.</param>
 /// <param name="rouletteSpinEventArgs">The roulette spin args.</param>
 private void SendMessageOnRouletteSpin(object sender, RouletteSpinEventArgs rouletteSpinEventArgs)
 {
     if (rouletteSpinEventArgs.Color == CellColor.Black)
     {
         _messageSender.Send($"Ball fell on black {rouletteSpinEventArgs.Number}.");
     }
 }