Exemplo n.º 1
0
 public void WorkerStarted(WorkerStartedEvent message)
 {
     lock (_padlock)
     {
         _workers[message.InboxWorkQueueUri] = GetAvailableWorkers(message.InboxWorkQueueUri)
                                               .Where(availableWorker => availableWorker.WorkerSendDate < message.DateStarted)
                                               .ToList();
     }
 }
        public void WorkerStarted(WorkerStartedEvent message)
        {
            lock (padlock)
            {
                var result = new List<AvailableWorker>();

                foreach (var availableWorker in availableWorkers)
                {
                    if (
                        !(availableWorker.InboxWorkQueueUri.Equals(message.InboxWorkQueueUri,
                                                                   StringComparison.InvariantCultureIgnoreCase) &&
                          availableWorker.WorkerSendDate < message.DateStarted))
                    {
                        result.Add(availableWorker);
                    }
                }

                availableWorkers = result;
            }
        }
        public void WorkerStarted(WorkerStartedEvent message)
        {
            lock (padlock)
            {
                var result = new List <AvailableWorker>();

                foreach (var availableWorker in availableWorkers)
                {
                    if (
                        !(availableWorker.InboxWorkQueueUri.Equals(message.InboxWorkQueueUri,
                                                                   StringComparison.InvariantCultureIgnoreCase) &&
                          availableWorker.WorkerSendDate < message.DateStarted))
                    {
                        result.Add(availableWorker);
                    }
                }

                availableWorkers = result;
            }
        }
 public void WorkerStarted(WorkerStartedEvent message)
 {
     lock (_padlock)
     {
         _workers[message.InboxWorkQueueUri] = GetAvailableWorkers(message.InboxWorkQueueUri)
             .Where(availableWorker => availableWorker.WorkerSendDate < message.DateStarted)
             .ToList();
     }
 }