File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -472,17 +472,14 @@ public OwinEntries(HttpContext context)
472
472
} ;
473
473
}
474
474
475
- static readonly string [ ] PortStrings = CreatePortStrings ( ) ;
476
- static string [ ] CreatePortStrings ( )
475
+ static string PortToString ( int port ) => port switch
477
476
{
478
- var ports = new string [ 65535 ] ; // limit of ephemeral ports https://en.wikipedia.org/wiki/Ephemeral_port
479
- for ( var i = 0 ; i < ports . Length ; i ++ )
480
- {
481
- ports [ i ] = ( i + 1 ) . ToString ( CultureInfo . InvariantCulture ) ;
482
- }
483
- return ports ;
484
- }
485
- static string PortToString ( int port ) => PortStrings [ port - 1 ] ;
477
+ 80 => "80" ,
478
+ 443 => "443" ,
479
+ 8080 => "8080" ,
480
+ 8081 => "8081" ,
481
+ _ => port . ToString ( CultureInfo . InvariantCulture ) ,
482
+ } ;
486
483
487
484
public int Count
488
485
{
You can’t perform that action at this time.
0 commit comments