File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,8 +68,14 @@ public static void ProcessMemberDeclarations(
6868 AttributeArgument ( LiteralExpression ( SyntaxKind . StringLiteralExpression , Literal ( generatorType . Assembly . GetName ( ) . Version . ToString ( ) ) ) ) ) ) ) )
6969 . WithLeadingTrivia ( member . GetLeadingTrivia ( ) ) ;
7070
71+ // [DebuggerNonUserCode] is not supported on interfaces, fields and event
72+ if ( member . Kind ( ) is not ( SyntaxKind . InterfaceDeclaration or SyntaxKind . FieldDeclaration or SyntaxKind . EventFieldDeclaration ) )
73+ {
74+ member = member . AddAttributeLists ( AttributeList ( SingletonSeparatedList ( Attribute ( IdentifierName ( "global::System.Diagnostics.DebuggerNonUserCode" ) ) ) ) ) ;
75+ }
76+
7177 // [ExcludeFromCodeCoverage] is not supported on interfaces and fields
72- if ( member . Kind ( ) is not SyntaxKind . InterfaceDeclaration and not SyntaxKind . FieldDeclaration )
78+ if ( member . Kind ( ) is not ( SyntaxKind . InterfaceDeclaration or SyntaxKind . FieldDeclaration ) )
7379 {
7480 member = member . AddAttributeLists ( AttributeList ( SingletonSeparatedList ( Attribute ( IdentifierName ( "global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage" ) ) ) ) ) ;
7581 }
You can’t perform that action at this time.
0 commit comments