示例#1
0
        private void Create(List <string> arguments)
        {
            if (WrongArgumentCount(arguments, 5))
            {
                return;
            }

            int number_of_slots    = Int32.Parse(arguments[3]);
            int number_of_invitees = Int32.Parse(arguments[4]);

            //correct number of arguments counting with the number of slots and invitees
            if (WrongArgumentCount(arguments, 4 + number_of_slots + number_of_invitees))
            {
                return;
            }

            List <string> slots    = arguments.GetRange(5, number_of_slots);
            List <string> invitees = null;

            if (number_of_invitees > 0)
            {
                invitees = arguments.GetRange(5 + number_of_slots, number_of_invitees);
            }

            string topic         = arguments[1];
            int    min_attendees = Int32.Parse(arguments[2]);

            _client.CreateMeeting(topic, min_attendees, number_of_slots, number_of_invitees, slots, invitees);
        }