public bool TryGetPollForRoom(int roomId, out RoomPoll roomPoll) { roomPoll = null; if (this._polls.Count(x => x.Value.RoomId == roomId) == 0) { return(false); } return(this._polls.TryGetValue(this._polls.FirstOrDefault(x => x.Value.RoomId == roomId).Value.Id, out roomPoll)); }
public bool TryGetPoll(int pollId, out RoomPoll roomPoll) { return(this._polls.TryGetValue(pollId, out roomPoll)); }