Esempio n. 1
0
        public bool CheckAccessToChatroom(int givenRoomId, int givenUserId)
        {
            ChatroomContainer temp = containerMain;
            bool returnVal         = default;

            foreach (Models.Chatroom variable in temp.Chatrooms)
            {
                if (variable.GetId() == givenRoomId)
                {
                    returnVal = variable.CheckAccess(givenUserId);
                }
            }

            return(returnVal);
        }
Esempio n. 2
0
        ChatroomContainer containerMain; //= new ChatroomContainer(1);

        public AjaxController()
        {
            this.containerMain = new ChatroomContainer(1);
            this.containerMain.FetchRooms();
        }