public GeneralMessagesService(WebSocketConnectionManager manager, AccountsManagerWeb am, ChannelsManager cm, MessagesManagerWeb mmw) : base(manager) { _mmw = mmw; _am = am; _cm = cm; foreach (var c in cm.GetAllChannels()) { Channels.TryAdd(c.Id, new SocketChannel(c, _am)); } foreach (var r in cm.GetAllRooms()) { Rooms.TryAdd(r.Id, new SocketRoom(r, this, _am)); } }