Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit 5216dab

Browse files
committed
Remove unnecessary .Invoke when invoking delegates
1 parent 7df0026 commit 5216dab

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ServiceStack.Text/Common/DeserializeType.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public static Type ExtractType(string strType)
8989
var propIndex = typeAttrInObject.Length;
9090
var typeName = Serializer.UnescapeSafeString(Serializer.EatValue(strType, ref propIndex));
9191

92-
var type = JsConfig.TypeFinder.Invoke(typeName);
92+
var type = JsConfig.TypeFinder(typeName);
9393

9494
if (type == null)
9595
{
@@ -250,7 +250,7 @@ public static Type ExtractType(ITypeSerializer Serializer, string strType)
250250
{
251251
var propIndex = typeAttrInObject.Length;
252252
var typeName = Serializer.EatValue(strType, ref propIndex);
253-
var type = JsConfig.TypeFinder.Invoke(typeName);
253+
var type = JsConfig.TypeFinder(typeName);
254254

255255
if (type == null)
256256
Tracer.Instance.WriteWarning("Could not find type: " + typeName);

src/ServiceStack.Text/ReflectionExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,7 @@ public static EmptyCtorDelegate GetConstructorMethod(string typeName)
428428
EmptyCtorDelegate emptyCtorFn;
429429
if (TypeNamesMap.TryGetValue(typeName, out emptyCtorFn)) return emptyCtorFn;
430430

431-
var type = JsConfig.TypeFinder.Invoke(typeName);
431+
var type = JsConfig.TypeFinder(typeName);
432432
if (type == null) return null;
433433
emptyCtorFn = GetConstructorMethodToCache(type);
434434

0 commit comments

Comments
 (0)