private static bool IsAttributeContext(CSharpSyntaxContext context, CancellationToken cancellationToken) { return (context.IsMemberAttributeContext(SyntaxKindSet.ClassInterfaceStructTypeDeclarations, cancellationToken) || (context.SyntaxTree.IsScript() && context.IsTypeAttributeContext(cancellationToken)) || context.IsStatementAttributeContext()); }