@@ -19,7 +19,7 @@ public partial class Interface : IMonitorStatus
1919 public string Alias { get ; internal set ; }
2020 public string TypeDescription { get ; internal set ; }
2121 public string PhysicalAddress { get ; internal set ; }
22- public bool IsTeam => TeamMembers ? . Any ( ) ?? false ;
22+ public bool IsTeam => TeamMembers ? . Count > 0 ;
2323 public bool IsUnwatched { get ; internal set ; }
2424
2525 public NodeStatus Status { get ; internal set ; }
@@ -40,7 +40,7 @@ public partial class Interface : IMonitorStatus
4040 // TODO: Implement
4141 public string MonitorStatusReason => null ;
4242
43- private static readonly Dictionary < string , string > _prettyNameReplacements = new Dictionary < string , string >
43+ private static readonly Dictionary < string , string > _prettyNameReplacements = new ( )
4444 {
4545 [ "Microsoft Network Adapter Multiplexor Driver" ] = "Microsoft Team" ,
4646 [ "Quad Port Server Adapter" ] = "Quad Port SA" ,
@@ -72,7 +72,7 @@ public string PrettySpeed
7272 get {
7373 if ( ! Speed . HasValue )
7474 {
75- if ( ! ( TeamMembers ? . Any ( ) ?? false ) )
75+ if ( ! ( TeamMembers ? . Count > 0 ) )
7676 {
7777 return "n/a" ;
7878 }
@@ -91,7 +91,7 @@ public string PrettySpeed
9191
9292 public string PrettyMAC =>
9393 PhysicalAddress ? . Length == 12
94- ? $ "{ PhysicalAddress . Substring ( 0 , 2 ) } -{ PhysicalAddress . Substring ( 2 , 2 ) } -{ PhysicalAddress . Substring ( 4 , 2 ) } -{ PhysicalAddress . Substring ( 6 , 2 ) } -{ PhysicalAddress . Substring ( 8 , 2 ) } -{ PhysicalAddress . Substring ( 10 , 2 ) } "
94+ ? $ "{ PhysicalAddress [ .. 2 ] } -{ PhysicalAddress . Substring ( 2 , 2 ) } -{ PhysicalAddress . Substring ( 4 , 2 ) } -{ PhysicalAddress . Substring ( 6 , 2 ) } -{ PhysicalAddress . Substring ( 8 , 2 ) } -{ PhysicalAddress . Substring ( 10 , 2 ) } "
9595 : PhysicalAddress ;
9696
9797 internal bool IsLikelyPrimary ( Regex pattern ) => pattern != null
0 commit comments