Browse Source

Small perf improvement in LINQ

Antony Corbett 2 năm trước cách đây
mục cha
commit
e1e5778ff0

+ 1 - 1
Source/QuestPDF/Infrastructure/PageContext.cs

@@ -39,7 +39,7 @@ namespace QuestPDF.Infrastructure
 
 
         public DocumentLocation? GetLocation(string name)
         public DocumentLocation? GetLocation(string name)
         {
         {
-            return Locations.FirstOrDefault(x => x.Name == name);
+            return Locations.Find(x => x.Name == name);
         }
         }
     }
     }
 }
 }