File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -453,11 +453,6 @@ protected virtual void OnConfigurationReset(EventArgs? e)
453453 /// Notify the registered listeners that the repository has had its configuration changed
454454 /// </summary>
455455 /// <param name="e">Empty EventArgs</param>
456- /// <remarks>
457- /// <para>
458- /// Notify any listeners that this repository's configuration has changed.
459- /// </para>
460- /// </remarks>
461456 protected virtual void OnConfigurationChanged ( EventArgs ? e )
462457 => ConfigurationChanged ? . Invoke ( this , e ?? EventArgs . Empty ) ;
463458
@@ -475,18 +470,14 @@ protected virtual void OnConfigurationChanged(EventArgs? e)
475470
476471 private static int GetWaitTime ( DateTime startTimeUtc , int millisecondsTimeout )
477472 {
478- if ( millisecondsTimeout == Timeout . Infinite )
479- {
480- return Timeout . Infinite ;
481- }
482- if ( millisecondsTimeout == 0 )
473+ if ( millisecondsTimeout is 0 or Timeout . Infinite )
483474 {
484- return 0 ;
475+ return millisecondsTimeout ;
485476 }
486477
487478 int elapsedMilliseconds = ( int ) ( DateTime . UtcNow - startTimeUtc ) . TotalMilliseconds ;
488479 int timeout = millisecondsTimeout - elapsedMilliseconds ;
489- return ( timeout < 0 ) ? 0 : timeout ;
480+ return Math . Max ( 0 , timeout ) ;
490481 }
491482
492483 /// <summary>
You can’t perform that action at this time.
0 commit comments