public static void ReleaseTakenSeat(int showId, int seatId, string userId) { var username = ChatUserManager.GetName(showId, userId); if (takenSeats.ContainsKey(showId) && takenSeats[showId].ContainsKey(username) && takenSeats[showId][username].Contains(seatId)) { takenSeats[showId][username].Remove(seatId); } }
public static List<int> ReleaseTakenSeats(int showId, string userId) { List<int> takenSeatsList = null; var username = ChatUserManager.GetName(showId, userId); if (takenSeats.ContainsKey(showId) && takenSeats[showId].ContainsKey(username)) { takenSeatsList = new List<int>(takenSeats[showId][username]); takenSeats[showId][username].Clear(); } return takenSeatsList; }