Skip to content

Commit c27cbc9

Browse files
committed
perf improvement for type resolution
1 parent 593b409 commit c27cbc9

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

CodingSeb.ExpressionEvaluator/ExpressionEvaluator.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2612,7 +2612,7 @@ private bool DefaultFunctions(string name, List<string> args, out object result)
26122612
return functionExists;
26132613
}
26142614

2615-
private Type GetTypeByFriendlyName(string typeName, bool withNameSpace = false)
2615+
private Type GetTypeByFriendlyName(string typeName)
26162616
{
26172617
Type result = null;
26182618
try
@@ -2636,9 +2636,9 @@ private Type GetTypeByFriendlyName(string typeName, bool withNameSpace = false)
26362636

26372637
for (int a = 0; a < Assemblies.Count && result == null; a++)
26382638
{
2639-
result = Type.GetType($"{typeName},{Assemblies[a].FullName}", false, !OptionCaseSensitiveEvaluationActive);
2640-
2641-
if (!typeName.Contains("."))
2639+
if(typeName.Contains("."))
2640+
result = Type.GetType($"{typeName},{Assemblies[a].FullName}", false, !OptionCaseSensitiveEvaluationActive);
2641+
else
26422642
{
26432643
for (int i = 0; i < Namespaces.Count && result == null; i++)
26442644
{

0 commit comments

Comments
 (0)