// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using System; using System.Collections.Generic; using osu.Framework.Allocation; using osu.Game.Online; using osu.Game.Online.API; using osu.Game.Online.Rooms; namespace osu.Game.Screens.OnlinePlay.Components { public abstract class RoomPollingComponent : PollingComponent { /// /// Invoked when any s have been received from the API. /// /// Any s present locally but not returned by this event are to be removed from display. /// If null, the display of local rooms is reset to an initial state. /// /// public Action> RoomsReceived; [Resolved] protected IAPIProvider API { get; private set; } protected void NotifyRoomsReceived(List rooms) => RoomsReceived?.Invoke(rooms); } }