public static EventDeclarationSyntax WithBody( this EventDeclarationSyntax parentSyntax, BlockSyntax childSyntax, SyntaxKind kind) { return(parentSyntax.WithAccessor(kind, parentSyntax.GetAccessor(kind).WithBody(childSyntax))); }
private static EventDeclarationSyntax CreateAccessorAttributes( EventDeclarationSyntax parentSyntax, SyntaxList <AttributeListSyntax> childSyntax, SyntaxKind kind) { AccessorDeclarationSyntax accessor = parentSyntax.GetAccessor(kind); return(parentSyntax.WithAccessor(kind, accessor.WithAttributeLists(childSyntax))); }