Example #1
0
 /// <summary>
 /// Iterates synchronously over all player slot controllers (active and inactive). No lock is being requested so if
 /// a lock is needed, this should be done outside or inside the <paramref name="execute"/> worker.
 /// </summary>
 /// <param name="execute"></param>
 internal void ForEachInternal(PlayerSlotWorkerInternalDelegate execute)
 {
     foreach (PlayerSlotController psc in _slots)
     {
         try
         {
             execute(psc);
         }
         catch (Exception e)
         {
             ServiceRegistration.Get <ILogger>().Error("Problem executing batch action for player slot controller {0}", e, psc.SlotIndex);
         }
     }
 }
Example #2
0
 /// <summary>
 /// Iterates synchronously over all player slot controllers (active and inactive). No lock is being requested so if
 /// a lock is needed, this should be done outside or inside the <paramref name="execute"/> worker.
 /// </summary>
 /// <param name="execute"></param>
 internal void ForEachInternal(PlayerSlotWorkerInternalDelegate execute)
 {
   foreach (PlayerSlotController psc in _slots)
     try
     {
       execute(psc);
     }
     catch (Exception e)
     {
       ServiceRegistration.Get<ILogger>().Error("Problem executing batch action for player slot controller {0}", e, psc.SlotIndex);
     }
 }