Пример #1
0
 /// <summary>
 /// Modifies the queue load.
 /// </summary>
 /// <param name="queueLoadEntity">The queue load entity.</param>
 public void ModifyQueueLoad(QueueLoadEntity queueLoadEntity)
 {
     if (!IdentitySpec.Instance.IsSatisfiedBy(queueLoadEntity.Identification))
     {
         return;
     }
     SaveQueueLoad(queueLoadEntity);
 }
Пример #2
0
        /// <summary>
        /// Saves the queue load.
        /// </summary>
        /// <param name="queueLoadEntity">The queue load entity.</param>
        private void SaveQueueLoad(QueueLoadEntity queueLoadEntity)
        {
            var repository  = GetReopsitory(queueLoadEntity);
            var serviceInfo = GetServiceInfo(queueLoadEntity.Identification, repository);

            UpdateEntity(serviceInfo, queueLoadEntity, (s => s.TotalMessages = queueLoadEntity.TotalMessages));
            Save(serviceInfo, repository, (bd => bd.SetValue(be => be.TotalMessages, serviceInfo.TotalMessages)));
        }