Skip to content

Commit c078cd6

Browse files
author
Minnie Liu
committed
addres comments
1 parent f2a748a commit c078cd6

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

articles/communication-services/quickstarts/rooms/includes/rooms-quickstart-net.md

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ Create a new `RoomsClient` object that will be used to create new `rooms` and ma
8686
var connectionString = "<connection_string>";
8787
RoomsClient roomsClient = new RoomsClient(connectionString);
8888

89-
// create identities for users
89+
// Create identities for users
9090
CommunicationIdentityClient identityClient = new CommunicationIdentityClient(connectionString);
9191
CommunicationUserIdentifier user1 = await identityClient.CreateUser();
9292
CommunicationUserIdentifier user2 = await identityClient.CreateUser();
@@ -99,7 +99,7 @@ Create a new `room` with default properties using the code snippet below:
9999

100100
```csharp
101101

102-
//Create a room
102+
// Create a room
103103
List roomParticipants = new List<RoomParticipant>();
104104
roomParticipants.Add(new RoomParticipant(new CommunicationUserIdentifier(user1.Value.User.Id), RoleType.Presenter));
105105

@@ -142,24 +142,26 @@ The lifetime of a `room` can be modified by issuing an update request for the `V
142142

143143
```csharp
144144

145-
//Update room lifetime
145+
// Update room lifetime
146146
DateTimeOffset validFrom = DateTimeOffset.UtcNow;
147147
DateTimeOffset validUntil = DateTimeOffset.UtcNow.AddDays(10);
148148
CommunicationRoom updatedRoom = await roomsClient.UpdateRoomAsync(roomId, validFrom, validUntil, cancellationToken);
149149
Console.WriteLine("\nUpdated room with validFrom: " + updatedRoom.ValidFrom + " and validUntil: " + updatedRoom.ValidUntil);
150150
```
151151

152-
### List all valid rooms
152+
### List all active rooms
153153

154-
To retrieve all valid rooms, use the `GetRoomsAsync` method exposed on the client.
154+
To retrieve all active rooms, use the `GetRoomsAsync` method exposed on the client.
155155

156156
```csharp
157+
158+
// List all active rooms
157159
AsyncPageable<CommunicationRoom> allRooms = await roomsClient.GetRoomsAsync();
158160
await foreach (CommunicationRoom room in allRooms)
159161
{
160162
if (room is not null)
161163
{
162-
Console.WriteLine("\nFirst room id in all valid rooms: " + room.Id);
164+
Console.WriteLine("\nFirst room id in all active rooms: " + room.Id);
163165
break;
164166
}
165167
}
@@ -193,26 +195,28 @@ Participants that have been added to a `room` become eligible to join calls. Par
193195
Retrieve the list of participants for an existing `room` by referencing the `roomId`:
194196

195197
```csharp
198+
196199
// Get list of participants in room
197200
AsyncPageable<RoomParticipant> existingParticipants = await roomsClient.GetParticipantsAsync(roomId);
198201
Console.WriteLine("\nRetrieved participants from room: ");
199202
await foreach (RoomParticipant participant in existingParticipants)
200203
{
201204
Console.WriteLine($"{participant.CommunicationIdentifier.ToString()}, {participant.Role.ToString()}");
202205
}
206+
203207
```
204208

205209
## Remove participants
206210

207211
To remove a participant from a `room` and revoke their access, use the `RemoveParticipantsAsync` method.
208212

209213
```csharp
214+
210215
// Remove user from room
211216
List<CommunicationIdentifier> participants = new List<CommunicationIdentifier>();
212217
participants.Add(user2);
213218

214219
Response removeParticipantsResponse = await roomsClient.RemoveParticipantsAsync(roomId, participants);
215-
await roomsClient.removeParticipants(roomId, removeParticipantsList);
216220
Console.WriteLine("\nRemoved participants from room");
217221

218222
```
@@ -249,7 +253,7 @@ Retrieved room with id: 99445276259151407
249253

250254
Updated room with validFrom: 2023-05-11T22:11:46.784Z and validUntil: 2023-05-21T22:16:46.784Z
251255

252-
First room id in all valid rooms: 99445276259151407
256+
First room id in all active rooms: 99445276259151407
253257

254258
Added or updated participants to room
255259

0 commit comments

Comments
 (0)