public void SimulateCount(string message, string to)
        {
            var e = new EventCounterArgs(message, to);

            for (var i = 0; i < 100; i++)
            {
                if (i == 71)
                {
                    OnCount(e);
                }
            }
        }
Example #2
0
 public void SendMessageFromPrinter(object sender, EventCounterArgs e)
 {
     Console.WriteLine(e.Message + " для " + e.To);
 }
        protected virtual void OnCount(EventCounterArgs e)
        {
            var temp = Volatile.Read(ref onCount);

            temp?.Invoke(this, e);
        }
 public void SendMessageToSms(object sender, EventCounterArgs e)
 {
     Console.WriteLine(e.Message + " для дорогова" + e.To);
 }