@@ -30,7 +30,7 @@ internal static class GetX
30
30
types = null ;
31
31
if ( invocation . ArgumentList != null &&
32
32
invocation . TryGetTarget ( KnownSymbol . Type . GetConstructor , context . SemanticModel , context . CancellationToken , out var getX ) &&
33
- TryGetTargetType ( invocation , context , out targetType , out _ ) &&
33
+ TryGetType ( invocation , context , out targetType , out _ ) &&
34
34
IsKnownSignature ( invocation , getX ) &&
35
35
TryGetFlagsOrDefault ( invocation , getX , context , out flagsArg , out effectiveFlags ) &&
36
36
TryGetTypesOrDefault ( invocation , getX , context , out typesArg , out types ) )
@@ -72,7 +72,7 @@ internal static class GetX
72
72
types = null ;
73
73
if ( invocation . ArgumentList != null &&
74
74
invocation . TryGetTarget ( KnownSymbol . Type . GetMethod , context . SemanticModel , context . CancellationToken , out var getX ) &&
75
- TryGetTargetType ( invocation , context , out targetType , out _ ) &&
75
+ TryGetType ( invocation , context , out targetType , out _ ) &&
76
76
IsKnownSignature ( invocation , getX ) &&
77
77
TryGetName ( invocation , getX , context , out nameArg , out targetName ) &&
78
78
TryGetFlagsOrDefault ( invocation , getX , context , out flagsArg , out effectiveFlags ) &&
@@ -99,7 +99,7 @@ internal static class GetX
99
99
types = null ;
100
100
if ( invocation . ArgumentList != null &&
101
101
invocation . TryGetTarget ( KnownSymbol . Type . GetMember , context . SemanticModel , context . CancellationToken , out var getX ) &&
102
- TryGetTargetType ( invocation , context , out targetType , out _ ) &&
102
+ TryGetType ( invocation , context , out targetType , out _ ) &&
103
103
IsKnownSignature ( invocation , getX ) &&
104
104
TryGetName ( invocation , getX , context , out nameArg , out targetName ) &&
105
105
TryGetFlagsOrDefault ( invocation , getX , context , out flagsArg , out effectiveFlags ) &&
@@ -135,12 +135,12 @@ internal static class GetX
135
135
/// <param name="result">The type.</param>
136
136
/// <param name="instance">The instance the type was called GetType on. Can be null</param>
137
137
/// <returns>True if the type could be determined.</returns>
138
- internal static bool TryGetTargetType ( InvocationExpressionSyntax getX , SyntaxNodeAnalysisContext context , out ITypeSymbol result , out Optional < IdentifierNameSyntax > instance )
138
+ internal static bool TryGetType ( InvocationExpressionSyntax getX , SyntaxNodeAnalysisContext context , out ITypeSymbol result , out Optional < IdentifierNameSyntax > instance )
139
139
{
140
140
result = null ;
141
141
instance = default ( Optional < IdentifierNameSyntax > ) ;
142
142
return getX . Expression is MemberAccessExpressionSyntax memberAccess &&
143
- TryGetTargetType ( memberAccess . Expression , context , null , out result , out instance ) ;
143
+ TryGetType ( memberAccess . Expression , context , null , out result , out instance ) ;
144
144
}
145
145
146
146
internal static GetXResult TryGetMember ( IMethodSymbol getX , ITypeSymbol targetType , string targetMetadataName , BindingFlags flags , IReadOnlyList < ITypeSymbol > types , SyntaxNodeAnalysisContext context , out ISymbol member )
@@ -419,7 +419,7 @@ bool IsKnownArgument(IParameterSymbol parameter)
419
419
effectiveFlags = 0 ;
420
420
if ( invocation . ArgumentList != null &&
421
421
invocation . TryGetTarget ( getXMethod , context . SemanticModel , context . CancellationToken , out var getX ) &&
422
- TryGetTargetType ( invocation , context , out targetType , out _ ) &&
422
+ TryGetType ( invocation , context , out targetType , out _ ) &&
423
423
TryGetName ( invocation , getX , context , out nameArg , out targetName ) &&
424
424
TryGetFlagsOrDefault ( invocation , getX , context , out flagsArg , out effectiveFlags ) )
425
425
{
@@ -626,7 +626,7 @@ private static bool HasVisibleMembers(ITypeSymbol type, BindingFlags effectiveFl
626
626
return true ;
627
627
}
628
628
629
- private static bool TryGetTargetType ( ExpressionSyntax expression , SyntaxNodeAnalysisContext context , PooledSet < ExpressionSyntax > visited , out ITypeSymbol result , out Optional < IdentifierNameSyntax > instance )
629
+ private static bool TryGetType ( ExpressionSyntax expression , SyntaxNodeAnalysisContext context , PooledSet < ExpressionSyntax > visited , out ITypeSymbol result , out Optional < IdentifierNameSyntax > instance )
630
630
{
631
631
instance = default ( Optional < IdentifierNameSyntax > ) ;
632
632
result = null ;
@@ -637,7 +637,7 @@ private static bool TryGetTargetType(ExpressionSyntax expression, SyntaxNodeAnal
637
637
{
638
638
return AssignedValueWalker . TryGetSingle ( local , context . SemanticModel , context . CancellationToken , out var assignedValue ) &&
639
639
visited . Add ( assignedValue ) &&
640
- TryGetTargetType ( assignedValue , context , visited , out result , out instance ) ;
640
+ TryGetType ( assignedValue , context , visited , out result , out instance ) ;
641
641
}
642
642
643
643
case TypeOfExpressionSyntax typeOf :
0 commit comments