Beispiel #1
0
 public void Push(Message message)
 {
     lock (_locker)
     {
         Console.WriteLine("Sent : " + message.MessageContent);
         _queue.Enqueue(message);
     }
 }
Beispiel #2
0
 public void AddJob(Message message)
 {
     FreeEvent.Reset();
     _jobQueue.Enqueue(message);
     JobReadyEvent.Set();
 }
 private void AddRoutesToList(Message message)
 {
     RouteMessage rm = (RouteMessage)message;
     lock(Routes)
     {
         foreach (Routing route in rm.Routes)
         {
             Routes.Add(route);
         }
     }
 }