Beispiel #1
0
 public static BattlelogPlayerCountsViewModel CompanionPlayerCountsToBattlelog(this ServerDetailsViewModel serverDetails)
 {
     return(new BattlelogPlayerCountsViewModel {
         Map = serverDetails.MapName,
         MapMode = (ulong)GenericHelpers.GameModeToEnum(serverDetails.MapMode),
         Players = 0,
         Queued = 0,
         Slots = new BattlelogSlotTypesViewModel {
             Queue = new BattlelogSlotsViewModel {
                 Current = serverDetails.Slots.Queue.Current,
                 Max = serverDetails.Slots.Queue.Max
             },
             Soldier = new BattlelogSlotsViewModel {
                 Current = serverDetails.Slots.Soldier.Current,
                 Max = serverDetails.Slots.Soldier.Max
             },
             Spectator = new BattlelogSlotsViewModel {
                 Current = serverDetails.Slots.Spectator.Current,
                 Max = serverDetails.Slots.Spectator.Max
             }
         }
     });
 }