private SyntaxNode CreateFullProperty(PropertyDeclarationSyntax property, char?backingFiledPrefix, string methodNameToNotifyThatPropertyWasChanged, SyntaxGenerator syntaxGenerator) { string propertyName = property.Identifier.ValueText; string fieldName = FieldNameGenerator.Generate(propertyName, backingFiledPrefix); return(syntaxGenerator.FullPrismPropertyDeclaration(propertyName, property.Type, fieldName, methodNameToNotifyThatPropertyWasChanged)); }
private List <SyntaxNode> CreateBackingFields(IEnumerable <PropertyDeclarationSyntax> properties, char?backingFiledPrefix, SyntaxGenerator syntaxGenerator) { var createdBackingFields = new List <SyntaxNode>(); foreach (PropertyDeclarationSyntax property in properties) { string propertyName = property.Identifier.ValueText; string fieldName = FieldNameGenerator.Generate(propertyName, backingFiledPrefix); var createdField = syntaxGenerator.FieldDeclaration(fieldName, property.Type, Accessibility.Private); createdBackingFields.Add(createdField); } return(createdBackingFields); }