File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
src/Analyzers/CSharp/Analysis/MakeMemberReadOnly Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ public sealed class MakeMemberReadOnlyAnalyzer : BaseDiagnosticAnalyzer
1616 {
1717 private static readonly MetadataName Microsoft_AspNetCore_Components_ParameterAttribute = MetadataName . Parse ( "Microsoft.AspNetCore.Components.ParameterAttribute" ) ;
1818 private static readonly MetadataName Microsoft_AspNetCore_Components_CascadingParameterAttribute = MetadataName . Parse ( "Microsoft.AspNetCore.Components.CascadingParameterAttribute" ) ;
19+ private static readonly MetadataName Newtonsoft_Json_JsonPropertyAttribute = MetadataName . Parse ( "Newtonsoft.Json.JsonPropertyAttribute" ) ;
1920
2021 private static ImmutableArray < DiagnosticDescriptor > _supportedDiagnostics ;
2122
@@ -200,6 +201,9 @@ private static bool AnalyzePropertyAttributes(IPropertySymbol propertySymbol)
200201
201202 if ( attributeClass . HasMetadataName ( Microsoft_AspNetCore_Components_CascadingParameterAttribute ) )
202203 return false ;
204+
205+ if ( attributeClass . HasMetadataName ( Newtonsoft_Json_JsonPropertyAttribute ) )
206+ return false ;
203207 }
204208
205209 return true ;
You can’t perform that action at this time.
0 commit comments