Преглед изворни кода

Reduce delegate invocations and enumeration. (#28468)

Paulo Morgado пре 5 година
родитељ
комит
560235080e
1 измењених фајлова са 1 додато и 2 уклоњено
  1. 1 2
      src/Http/Routing/src/EndpointNameAddressScheme.cs

+ 1 - 2
src/Http/Routing/src/EndpointNameAddressScheme.cs

@@ -73,8 +73,7 @@ namespace Microsoft.AspNetCore.Routing
             // OK we need to report some duplicates.
             var duplicates = endpoints
                 .GroupBy(e => GetEndpointName(e))
-                .Where(g => g.Key != null)
-                .Where(g => g.Count() > 1);
+                .Where(g => g.Key != null && g.Count() > 1);
 
             var builder = new StringBuilder();
             builder.AppendLine(Resources.DuplicateEndpointNameHeader);