private void ProcessLostChats(IEnumerable <int> chatIds) { if (chatIds == null) { return; } var chatIdsArray = chatIds as int[] ?? chatIds.ToArray(); if (!chatIdsArray.Any()) { return; } lock (ChatsStorage) foreach (var chatId in chatIdsArray) { if (ChatsStorage.ContainsKey(chatId)) { ChatsStorage.Remove(chatId); } } LostChatsEvent?.Invoke(this, chatIdsArray); }
private void PollerOnLostChatsEvent(object sender, IEnumerable <int> enumerable) { LostChatsEvent?.Invoke(this, enumerable); }