using Microsoft.Extensions.Logging; using Tiger.Game.Rooms.Models; using Tiger.Storage; namespace Tiger.Game.Rooms; public class RoomManager : IRoomManager { private readonly IRepository _roomModelRepository; private readonly ILogger _logger; public RoomManager(IRepository roomModelRepository, ILogger logger) { _roomModelRepository = roomModelRepository; _logger = logger; } public Dictionary Models { get; private set; } = new(); public async Task LoadModelsAsync() { Models = (await _roomModelRepository.FindByAsync()).ToDictionary(rm => rm.Name); _logger.LogInformation("Loaded {Count} room models", Models.Count); } }