public static void Analyze(SyntaxNodeAnalysisContext context, EventDeclarationSyntax eventDeclaration) { eventDeclaration = (EventDeclarationSyntax)context.Node; if (eventDeclaration.IsParentKind(SyntaxKind.InterfaceDeclaration) || eventDeclaration.Modifiers.Contains(SyntaxKind.AbstractKeyword)) { AccessorListSyntax accessorList = eventDeclaration.AccessorList; if (accessorList != null) { ReportDiagnostic(context, eventDeclaration, accessorList); } } }