protected override IEnumerable <SyntaxNode> GenerateColumnProperty(SyntaxGenerator g, ITypeSymbol type, string name)
            {
                var backingFieldName = "m_" + name;

                yield return(g.FieldDeclaration(backingFieldName, g.IdentifierName(type.Name), accessibility: Accessibility.Private));

                var propertyStatement = SyntaxFactory.PropertyStatement(name)
                                        .AddModifiers(SyntaxFactory.Token(SyntaxKind.PublicKeyword))
                                        .WithAsClause(SyntaxFactory.SimpleAsClause((TypeSyntax)g.IdentifierName(type.Name)));

                var getter = SyntaxFactory.AccessorBlock(SyntaxKind.GetAccessorBlock,
                                                         SyntaxFactory.AccessorStatement(SyntaxKind.GetAccessorStatement, SyntaxFactory.Token(SyntaxKind.GetKeyword)),
                                                         new SyntaxList <StatementSyntax>().Add((StatementSyntax)g.ReturnStatement(g.IdentifierName(backingFieldName))),
                                                         SyntaxFactory.EndGetStatement());
                var setter = SyntaxFactory.AccessorBlock(SyntaxKind.SetAccessorBlock,
                                                         SyntaxFactory.AccessorStatement(SyntaxKind.SetAccessorStatement, SyntaxFactory.Token(SyntaxKind.SetKeyword)).AddModifiers(SyntaxFactory.Token(SyntaxKind.PrivateKeyword)),
                                                         new SyntaxList <StatementSyntax>().Add((StatementSyntax)g.AssignmentStatement(g.IdentifierName(backingFieldName), g.IdentifierName("Value"))),
                                                         SyntaxFactory.EndSetStatement());

                var accessors = new SyntaxList <AccessorBlockSyntax>().AddRange(new AccessorBlockSyntax[] { getter, setter });
                var result    = SyntaxFactory.PropertyBlock(propertyStatement, accessors);

                yield return(result);
            }
        Document PerformAction(Document document, SemanticModel model, SyntaxNode root, PropertyBlockSyntax propertyDeclaration, bool needsSetter)
        {
            AccessorBlockSyntax accessor = null;
            PropertyBlockSyntax newProp  = null;

            if (needsSetter)
            {
                accessor = SyntaxFactory.AccessorBlock(
                    SyntaxKind.SetAccessorBlock,
                    SyntaxFactory.AccessorStatement(SyntaxKind.SetAccessorStatement, SyntaxFactory.Token(SyntaxKind.SetKeyword))
                    .WithParameterList(SyntaxFactory.ParameterList(SyntaxFactory.SeparatedList(new[] {
                    SyntaxFactory.Parameter(SyntaxFactory.List <AttributeListSyntax>(), SyntaxFactory.TokenList(SyntaxFactory.Token(SyntaxKind.ByValKeyword)), SyntaxFactory.ModifiedIdentifier("value"), SyntaxFactory.SimpleAsClause(propertyDeclaration.PropertyStatement.AsClause.Type().WithoutTrailingTrivia()), null)
                }))),
                    SyntaxFactory.EndBlockStatement(SyntaxKind.EndSetStatement, SyntaxFactory.Token(SyntaxKind.SetKeyword)));

                var getter = propertyDeclaration.Accessors.FirstOrDefault(m => m.IsKind(SyntaxKind.GetAccessorBlock));
                if (getter != null)
                {
                    var getField = getter.ScanGetter(model);
                    if (getField == null || getField.IsReadOnly)
                    {
                        // Readonly or no field can be found
                        accessor = accessor.WithStatements(SyntaxFactory.List <StatementSyntax>(new[] { GetNotImplementedThrowStatement() }));
                    }
                    else
                    {
                        // Now we add a 'field = value'.
                        accessor = accessor.WithStatements(SyntaxFactory.List <StatementSyntax>(new[] {
                            SyntaxFactory.AssignmentStatement(SyntaxKind.SimpleAssignmentStatement, SyntaxFactory.IdentifierName(getField.Name), SyntaxFactory.Token(SyntaxKind.EqualsToken), SyntaxFactory.IdentifierName("value"))
                        }));
                    }
                }
                var modifierList = SyntaxFactory.TokenList(propertyDeclaration.PropertyStatement.Modifiers.Where(m => !m.IsKind(SyntaxKind.ReadOnlyKeyword)));
                newProp = propertyDeclaration
                          .WithAccessors(propertyDeclaration.Accessors.Add(accessor))
                          .WithPropertyStatement(propertyDeclaration.PropertyStatement.WithModifiers(modifierList));
            }
            else
            {
                accessor = SyntaxFactory.AccessorBlock(SyntaxKind.GetAccessorBlock,
                                                       SyntaxFactory.AccessorStatement(SyntaxKind.GetAccessorStatement, SyntaxFactory.Token(SyntaxKind.GetKeyword)),
                                                       SyntaxFactory.EndBlockStatement(SyntaxKind.EndGetStatement, SyntaxFactory.Token(SyntaxKind.GetKeyword)));

                var setter           = propertyDeclaration.Accessors.FirstOrDefault(m => m.IsKind(SyntaxKind.SetAccessorBlock));
                var accessorDeclList = new SyntaxList <AccessorBlockSyntax>();
                if (setter != null)
                {
                    var setField = setter.ScanSetter(model);
                    if (setField == null)
                    {
                        // No field can be found
                        accessor = accessor.WithStatements(SyntaxFactory.List <StatementSyntax>(new[] { GetNotImplementedThrowStatement() }));
                    }
                    else
                    {
                        // Add a 'Return field'.
                        accessor = accessor.WithStatements(SyntaxFactory.List <StatementSyntax>(
                                                               new[] { SyntaxFactory.ReturnStatement(SyntaxFactory.IdentifierName(setField.Name)) }));
                    }
                    accessorDeclList = accessorDeclList.Add(propertyDeclaration.Accessors.First(m => m.IsKind(SyntaxKind.SetAccessorBlock)));
                }
                accessorDeclList = accessorDeclList.Insert(0, accessor);
                var accessorList = SyntaxFactory.List(accessorDeclList);
                var modifierList = SyntaxFactory.TokenList(propertyDeclaration.PropertyStatement.Modifiers.Where(m => !m.IsKind(SyntaxKind.WriteOnlyKeyword)));
                newProp = propertyDeclaration
                          .WithAccessors(accessorList)
                          .WithPropertyStatement(propertyDeclaration.PropertyStatement.WithModifiers(modifierList));
            }
            var newRoot = root.ReplaceNode(propertyDeclaration, newProp).WithAdditionalAnnotations(Formatter.Annotation);

            return(document.WithSyntaxRoot(newRoot));
        }