Skip to content

Commit 7062757

Browse files
committed
Refactor: change parameter order.
1 parent 68917f1 commit 7062757

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

ReflectionAnalyzers/Helpers/GetX.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ internal static class GetX
4242
if (invocation.ArgumentList != null &&
4343
invocation.TryGetTarget(KnownSymbol.Type.GetMethod, context.SemanticModel, context.CancellationToken, out var getX) &&
4444
TryGetTargetType(invocation, context, out targetType, out _) &&
45-
IsKnownSignature(getX, invocation) &&
45+
IsKnownSignature(invocation, getX) &&
4646
TryGetName(invocation, getX, context, out nameArg, out targetName) &&
4747
(TryGetFlags(invocation, getX, context, out flagsArg, out flags) ||
4848
TryGetDefaultFlags(KnownSymbol.Type.GetMethod, out flags)))
@@ -67,7 +67,7 @@ internal static class GetX
6767
if (invocation.ArgumentList != null &&
6868
invocation.TryGetTarget(KnownSymbol.Type.GetMember, context.SemanticModel, context.CancellationToken, out var getX) &&
6969
TryGetTargetType(invocation, context, out targetType, out _) &&
70-
IsKnownSignature(getX, invocation) &&
70+
IsKnownSignature(invocation, getX) &&
7171
TryGetName(invocation, getX, context, out nameArg, out targetName) &&
7272
(TryGetFlags(invocation, getX, context, out flagsArg, out flags) ||
7373
TryGetDefaultFlags(KnownSymbol.Type.GetMember, out flags)))
@@ -362,9 +362,9 @@ internal static bool TryGetDefaultFlags(QualifiedMethod getX, out BindingFlags d
362362
/// <summary>
363363
/// Defensive check to only handle known cases. Don't know how the binder works.
364364
/// </summary>
365-
private static bool IsKnownSignature(IMethodSymbol candidate, InvocationExpressionSyntax invocation)
365+
private static bool IsKnownSignature(InvocationExpressionSyntax invocation, IMethodSymbol getX)
366366
{
367-
foreach (var parameter in candidate.Parameters)
367+
foreach (var parameter in getX.Parameters)
368368
{
369369
if (!IsKnownArgument(parameter))
370370
{

0 commit comments

Comments
 (0)