@@ -84,14 +84,14 @@ public static bool TryParse(SyntaxNodeAnalysisContext syntaxNodeContext, out Htt
8484 return false ;
8585 }
8686
87- var ihttpApi = syntaxNodeContext . Compilation . GetTypeByMetadataName ( IHttpApiTypeName ) ;
88- if ( ihttpApi == null )
87+ var httpApi = syntaxNodeContext . Compilation . GetTypeByMetadataName ( IHttpApiTypeName ) ;
88+ if ( httpApi == null )
8989 {
9090 return false ;
9191 }
9292
93- var iapiAttribute = syntaxNodeContext . Compilation . GetTypeByMetadataName ( IApiAttributeTypeName ) ;
94- if ( IsHttpApiInterface ( @interface , ihttpApi , iapiAttribute ) == false )
93+ var apiAttribute = syntaxNodeContext . Compilation . GetTypeByMetadataName ( IApiAttributeTypeName ) ;
94+ if ( IsHttpApiInterface ( @interface , httpApi , apiAttribute ) == false )
9595 {
9696 return false ;
9797 }
@@ -105,27 +105,27 @@ public static bool TryParse(SyntaxNodeAnalysisContext syntaxNodeContext, out Htt
105105 }
106106
107107 /// <summary>
108- /// 是否为http接口
108+ /// 是否为 http 接口
109109 /// </summary>
110110 /// <param name="interface"></param>
111- /// <param name="ihttpApi "></param>
112- /// <param name="iapiAttribute "></param>
111+ /// <param name="httpApi "></param>
112+ /// <param name="apiAttribute "></param>
113113 /// <returns></returns>
114- private static bool IsHttpApiInterface ( INamedTypeSymbol @interface , INamedTypeSymbol ihttpApi , INamedTypeSymbol ? iapiAttribute )
114+ private static bool IsHttpApiInterface ( INamedTypeSymbol @interface , INamedTypeSymbol httpApi , INamedTypeSymbol ? apiAttribute )
115115 {
116- if ( @interface . AllInterfaces . Contains ( ihttpApi ) )
116+ if ( @interface . AllInterfaces . Contains ( httpApi ) )
117117 {
118118 return true ;
119119 }
120120
121- if ( iapiAttribute == null )
121+ if ( apiAttribute == null )
122122 {
123123 return false ;
124124 }
125125
126126 return @interface . AllInterfaces . Append ( @interface ) . Any ( i =>
127- HasAttribute ( i , iapiAttribute ) || i . GetMembers ( ) . OfType < IMethodSymbol > ( ) . Any ( m =>
128- HasAttribute ( m , iapiAttribute ) || m . Parameters . Any ( p => HasAttribute ( p , iapiAttribute ) ) ) ) ;
127+ HasAttribute ( i , apiAttribute ) || i . GetMembers ( ) . OfType < IMethodSymbol > ( ) . Any ( m =>
128+ HasAttribute ( m , apiAttribute ) || m . Parameters . Any ( p => HasAttribute ( p , apiAttribute ) ) ) ) ;
129129 }
130130
131131
0 commit comments