Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
beyaz committed Oct 4, 2023
1 parent cd3a568 commit 703d8cc
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions ApiInspector.NetFramework/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -210,10 +210,10 @@ public static string InvokeMethod((string fullAssemblyPath, MethodReference meth
// ReSharper disable once CanSimplifyDictionaryLookupWithTryGetValue
if (parameterInfo.Name is not null)
{
var jToken = map.Property(parameterInfo.Name, StringComparison.OrdinalIgnoreCase);
if (jToken != null)
var jProperty = map.Property(parameterInfo.Name, StringComparison.OrdinalIgnoreCase);
if (jProperty != null)
{
var (occurredErrorWhenCreatingInstance, isSuccessfullyCreated, parameterInstance) = Plugin.TryCreateInstance(parameterInfo.ParameterType, jToken.ToString());
var (occurredErrorWhenCreatingInstance, isSuccessfullyCreated, parameterInstance) = Plugin.TryCreateInstance(parameterInfo.ParameterType, jProperty.ToString());

if (occurredErrorWhenCreatingInstance != null)
{
Expand All @@ -226,7 +226,7 @@ public static string InvokeMethod((string fullAssemblyPath, MethodReference meth
continue;
}

invocationParameters.Add(jToken.ToObject(parameterInfo.ParameterType));
invocationParameters.Add(jProperty.Value.ToObject(parameterInfo.ParameterType));
continue;
}
}
Expand Down

0 comments on commit 703d8cc

Please sign in to comment.