@@ -34,9 +34,9 @@ public EnterNamesForm(bool autostart, string configPath)
3434 }
3535 }
3636
37- private MenuItem ? GetRecentMenuItem ( )
37+ private MenuItem GetRecentMenuItem ( )
3838 {
39- return this . FindControl < MenuItem > ( "recentMenuItem" ) ;
39+ return this . FindControl < MenuItem > ( "recentMenuItem" ) ! ;
4040 }
4141
4242 private TimeSpan GetSessionTotalDuration ( )
@@ -131,7 +131,7 @@ public async void StartForm(object? sender, RoutedEventArgs args)
131131 {
132132 var participants = GetParticipants ( ) ;
133133 var totalDuration = GetSessionTotalDuration ( ) ;
134- var session = new PairCodingSession ( participants , ( int ) minutesPerTurn . Value , GetSessionTotalDuration ( ) ) ;
134+ var session = new PairCodingSession ( participants , ( int ) minutesPerTurn . Value ! , GetSessionTotalDuration ( ) ) ;
135135 var validationMessage = session . Validate ( ) ;
136136
137137 if ( ! string . IsNullOrWhiteSpace ( validationMessage ) )
@@ -259,16 +259,16 @@ private static void AddParticipantIfAvailable(string name, List<string> particip
259259 private string [ ] GetParticipants ( )
260260 {
261261 var participants = new List < string > ( ) ;
262- AddParticipantIfAvailable ( participant1 . Text , participants ) ;
263- AddParticipantIfAvailable ( participant2 . Text , participants ) ;
264- AddParticipantIfAvailable ( participant3 . Text , participants ) ;
265- AddParticipantIfAvailable ( participant4 . Text , participants ) ;
266- AddParticipantIfAvailable ( participant5 . Text , participants ) ;
267- AddParticipantIfAvailable ( participant6 . Text , participants ) ;
268- AddParticipantIfAvailable ( participant7 . Text , participants ) ;
269- AddParticipantIfAvailable ( participant8 . Text , participants ) ;
270- AddParticipantIfAvailable ( participant9 . Text , participants ) ;
271- AddParticipantIfAvailable ( participant10 . Text , participants ) ;
262+ AddParticipantIfAvailable ( participant2 . Text ?? string . Empty , participants ) ;
263+ AddParticipantIfAvailable ( participant1 . Text ?? string . Empty , participants ) ;
264+ AddParticipantIfAvailable ( participant3 . Text ?? string . Empty , participants ) ;
265+ AddParticipantIfAvailable ( participant4 . Text ?? string . Empty , participants ) ;
266+ AddParticipantIfAvailable ( participant5 . Text ?? string . Empty , participants ) ;
267+ AddParticipantIfAvailable ( participant6 . Text ?? string . Empty , participants ) ;
268+ AddParticipantIfAvailable ( participant7 . Text ?? string . Empty , participants ) ;
269+ AddParticipantIfAvailable ( participant8 . Text ?? string . Empty , participants ) ;
270+ AddParticipantIfAvailable ( participant9 . Text ?? string . Empty , participants ) ;
271+ AddParticipantIfAvailable ( participant10 . Text ?? string . Empty , participants ) ;
272272
273273 return participants . ToArray ( ) ;
274274 }
0 commit comments