@@ -36,10 +36,10 @@ context.ContainingSymbol is IMethodSymbol method &&
3636 {
3737 using ( var pairs = GetPairs ( template , method ) )
3838 {
39- if ( pairs . TrySingle ( x => x . FromTemplate == null , out var withMethodParameter ) &&
40- methodDeclaration . TryFindParameter ( withMethodParameter . FromMethodSymbol . Name , out var parameterSyntax ) &&
41- pairs . TrySingle ( x => x . FromMethodSymbol == null , out var withTemplateParameter ) &&
42- withTemplateParameter . FromTemplate is TemplateParameter templateParameter )
39+ if ( pairs . TrySingle ( x => x . Route == null , out var withMethodParameter ) &&
40+ methodDeclaration . TryFindParameter ( withMethodParameter . Symbol . Name , out var parameterSyntax ) &&
41+ pairs . TrySingle ( x => x . Symbol == null , out var withTemplateParameter ) &&
42+ withTemplateParameter . Route is TemplateParameter templateParameter )
4343 {
4444 context . ReportDiagnostic (
4545 Diagnostic . Create (
@@ -55,19 +55,19 @@ context.ContainingSymbol is IMethodSymbol method &&
5555 templateParameter . Name . GetLocation ( ) ,
5656 ImmutableDictionary < string , string > . Empty . Add (
5757 nameof ( Text ) ,
58- withMethodParameter . FromMethodSymbol . Name ) ) ) ;
58+ withMethodParameter . Symbol . Name ) ) ) ;
5959 }
60- else if ( pairs . Count ( x => x . FromTemplate == null ) > 1 &&
61- pairs . Count ( x => x . FromMethodSymbol == null ) > 1 )
60+ else if ( pairs . Count ( x => x . Route == null ) > 1 &&
61+ pairs . Count ( x => x . Symbol == null ) > 1 )
6262 {
6363 context . ReportDiagnostic (
6464 Diagnostic . Create (
6565 ASP001ParameterName . Descriptor ,
6666 methodDeclaration . ParameterList . GetLocation ( ) ) ) ;
6767 }
6868
69- if ( pairs . TryFirst ( x => x . FromMethodSymbol == null , out _ ) &&
70- ! pairs . TryFirst ( x => x . FromTemplate == null , out _ ) )
69+ if ( pairs . TryFirst ( x => x . Symbol == null , out _ ) &&
70+ ! pairs . TryFirst ( x => x . Route == null , out _ ) )
7171 {
7272 context . ReportDiagnostic (
7373 Diagnostic . Create (
@@ -78,7 +78,7 @@ context.ContainingSymbol is IMethodSymbol method &&
7878 foreach ( var pair in pairs )
7979 {
8080 if ( HasWrongType ( pair , out var typeName ) &&
81- methodDeclaration . TryFindParameter ( pair . FromMethodSymbol ? . Name , out parameterSyntax ) )
81+ methodDeclaration . TryFindParameter ( pair . Symbol ? . Name , out parameterSyntax ) )
8282 {
8383 context . ReportDiagnostic (
8484 Diagnostic . Create (
@@ -173,7 +173,7 @@ private static PooledList<ParameterPair> GetPairs(UrlTemplate template, IMethodS
173173 foreach ( var component in template . Path )
174174 {
175175 if ( component . Parameter is TemplateParameter templateParameter &&
176- list . All ( x => x . FromTemplate != templateParameter ) )
176+ list . All ( x => x . Route != templateParameter ) )
177177 {
178178 list . Add ( new ParameterPair ( templateParameter , null ) ) ;
179179 }
@@ -184,8 +184,8 @@ private static PooledList<ParameterPair> GetPairs(UrlTemplate template, IMethodS
184184
185185 private static bool HasWrongType ( ParameterPair pair , out string correctType )
186186 {
187- if ( pair . FromTemplate ? . Constraints is ImmutableArray < RouteConstraint > constraints &&
188- pair . FromMethodSymbol is IParameterSymbol parameter )
187+ if ( pair . Route ? . Constraints is ImmutableArray < RouteConstraint > constraints &&
188+ pair . Symbol is IParameterSymbol parameter )
189189 {
190190 foreach ( var constraint in constraints )
191191 {
0 commit comments