Пример #1
0
        public async Task <IEnumerable <RoomDetails> > GetAllRoomsAsync()
        {
            ResourceSet <RoomResource> rooms = await RoomResource.ReadAsync();

            IEnumerable <Task <RoomDetails> > tasks = rooms.Select(
                room => GetRoomDetailsAsync(
                    room,
                    ParticipantResource.ReadAsync(
                        room.Sid,
                        ParticipantStatus.Connected)));

            return(await Task.WhenAll(tasks));
        }