Skip to content

Commit c731e94

Browse files
author
Stewart Miles
committed
Slightly improve performance of class lookup in VersionHandler
VersionHandler.FindClass() iterating through all classes in the app domain after the class being searched for was found. This fixes the method to stop searching when the class has been found. Change-Id: I597a657d6cdddd486c419e3827a068adc808a5a7
1 parent ef792db commit c731e94

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

source/VersionHandler/src/VersionHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -442,6 +442,7 @@ public static Type FindClass(string assemblyName, string className) {
442442
foreach (var currentType in assembly.GetTypes()) {
443443
if (currentType.FullName == className) {
444444
type = currentType;
445+
break;
445446
}
446447
}
447448
if (type != null) break;

0 commit comments

Comments
 (0)