Example #1
0
        public void AddAgendaItem(AgendaItem agendaItem, User currUser)
        {
            if (agendaItem == null)
            {
                throw new CantBeNullException();
            }

            else if (currUser != Owner && !currUser.Admin)
            {
                throw new InvalidAccessException();
            }
            else
            {
                AgendaItems.Add(agendaItem);
            }
        }
Example #2
0
        /*public SoundFile BeginRecordSound()
         * {
         *  throw new System.NotImplementedException();
         * }
         *
         * public SoundFile StopRecordSound()
         * {
         *  throw new System.NotImplementedException();
         * }*/

        public void RemoveAgendaItem(AgendaItem agendaItem, User currUser)
        {
            if (agendaItem == null)
            {
                throw new CantBeNullException();
            }
            else if (currUser != Owner && !currUser.Admin)
            {
                throw new InvalidAccessException();
            }
            else if (!AgendaItems.Contains(agendaItem))
            {
                throw new DoNotContainElementException();
            }
            else
            {
                AgendaItems.Remove(agendaItem);
            }
        }