File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -68,8 +68,14 @@ public static void ProcessMemberDeclarations(
68
68
AttributeArgument ( LiteralExpression ( SyntaxKind . StringLiteralExpression , Literal ( generatorType . Assembly . GetName ( ) . Version . ToString ( ) ) ) ) ) ) ) )
69
69
. WithLeadingTrivia ( member . GetLeadingTrivia ( ) ) ;
70
70
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
+
71
77
// [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 ) )
73
79
{
74
80
member = member . AddAttributeLists ( AttributeList ( SingletonSeparatedList ( Attribute ( IdentifierName ( "global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage" ) ) ) ) ) ;
75
81
}
You can’t perform that action at this time.
0 commit comments