private static Task <Document> ApplyNonSerializedWithTargetFixAsync(CodeFixContext context, SyntaxNode syntaxRoot, EventFieldDeclarationSyntax field) { var updated = field.AddAttributeLists(NonSerializedWithTargetSpecifier); return(Task.FromResult(context.Document.WithSyntaxRoot(syntaxRoot.ReplaceNode(field, updated)))); }