private static async Task <Document> SynchronizeProperty(Document document, PropertyDeclarationSyntax property, CancellationToken cancellationToken) { var backingField = PropertyBuilder.BuildBackingField(property); var newProperty = PropertyBuilder.BuildPropertyWithSynchronizedBackingField(property, backingField); var documentEditor = await DocumentEditor.CreateAsync(document, cancellationToken); documentEditor.InsertBefore(property, backingField); documentEditor.ReplaceNode(property, newProperty); return(documentEditor.GetChangedDocument()); }