using Microsoft.Extensions.Logging; using Tiger.Storage; namespace Tiger.Game.Rooms; public class RoomManager : IRoomManager { private readonly IRepository _roomPrivateCategoryRepository; private readonly ILogger _logger; public IDictionary PrivateCategories { get; private set; } public RoomManager(IRepository roomPrivateCategoryRepository, ILogger logger) { _roomPrivateCategoryRepository = roomPrivateCategoryRepository; _logger = logger; PrivateCategories = new Dictionary(); } public async Task LoadPrivateCategoriesAsync() { PrivateCategories = (await _roomPrivateCategoryRepository.FindByAsync()).ToDictionary(rpc => rpc.Id); _logger.LogInformation("Loaded {Count} private room categories", PrivateCategories.Count); } }