Commit 92044d7
authored
Refactor switch cases and improve string formatting (#1659)
* Refactor switch cases and improve string formatting
Refactored switch-case statements in RTCPFeedback.cs to use the Header property directly for pattern matching, enhancing clarity. Updated exception message in RTCPHeader.cs to use string interpolation. Simplified ToString() in RTCPTWCCFeedback.cs to use a single interpolated string for better readability.
* Refactor switch pattern variable in RTCPFeedback.cs
Renamed the pattern variable in switch cases from '_' to 'h' to improve readability and allow direct access to the matched object. No logic changes were made.
* Refactor switch case to use pattern matching for RTPFB
Updated the switch statement to use pattern matching (case var h when h.PacketType == RTCPReportTypesEnum.RTPFB), enabling access to the matched variable within the case block for improved clarity and maintainability.1 parent 8d51fc2 commit 92044d7
3 files changed
Lines changed: 10 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
172 | 172 | | |
173 | 173 | | |
174 | 174 | | |
175 | | - | |
| 175 | + | |
176 | 176 | | |
177 | 177 | | |
178 | 178 | | |
179 | | - | |
| 179 | + | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
| 185 | + | |
186 | 186 | | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
271 | 271 | | |
272 | 272 | | |
273 | | - | |
| 273 | + | |
274 | 274 | | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
278 | | - | |
| 278 | + | |
279 | 279 | | |
280 | | - | |
| 280 | + | |
281 | 281 | | |
282 | 282 | | |
283 | 283 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
524 | 524 | | |
525 | 525 | | |
526 | 526 | | |
527 | | - | |
528 | | - | |
529 | | - | |
| 527 | + | |
530 | 528 | | |
531 | 529 | | |
532 | 530 | | |
| |||
0 commit comments