File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,7 @@ static ObservableRecipientInfo GetInfo(INamedTypeSymbol typeSymbol, AttributeDat
52
52
// Check whether [RequiresUnreferencedCode] is available
53
53
IncrementalValueProvider < bool > isRequiresUnreferencedCodeAttributeAvailable =
54
54
context . CompilationProvider
55
- . Select ( static ( item , _ ) => item . GetTypeByMetadataName ( "System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute" ) is not null ) ;
55
+ . Select ( static ( item , _ ) => item . GetTypeByMetadataName ( "System.Diagnostics.CodeAnalysis.RequiresUnreferencedCodeAttribute" ) is { DeclaredAccessibility : Accessibility . Public } ) ;
56
56
57
57
return
58
58
source
@@ -128,7 +128,7 @@ MemberDeclarationSyntax RemoveRequiresUnreferencedCodeAttributeIfNeeded(MemberDe
128
128
member
129
129
. DescendantNodes ( )
130
130
. OfType < AttributeListSyntax > ( )
131
- . First ( node => ( ( IdentifierNameSyntax ) ( ( QualifiedNameSyntax ) node . Attributes [ 0 ] . Name ) . Right ) . Identifier . ValueText == "RequiresUnreferencedCode" ) ;
131
+ . First ( node => node . Attributes [ 0 ] . Name is QualifiedNameSyntax { Right : IdentifierNameSyntax { Identifier . ValueText : "RequiresUnreferencedCode" } } ) ;
132
132
133
133
return member . RemoveNode ( attributeNode , SyntaxRemoveOptions . KeepExteriorTrivia ) ! ;
134
134
}
You can’t perform that action at this time.
0 commit comments