private static PropertyDeclarationSyntax CreateAutoProperty(AutoProperty property) { var propertyDeclaration = PropertyDeclaration( TypeGenerator.Create(property.Type), Identifier(property.Name)) .AddAccessorListAccessors(CreateAccessDeclaration(SyntaxKind.GetAccessorDeclaration, null, property.GetModifiers)); if (property.PropertyType == PropertyTypes.GetAndSet) { propertyDeclaration = propertyDeclaration.AddAccessorListAccessors(CreateAccessDeclaration(SyntaxKind.SetAccessorDeclaration, null, property.SetModifiers)); } return(propertyDeclaration); }
private static PropertyDeclarationSyntax CreateAutoProperty(AutoProperty property) { var propertyDeclaration = PropertyDeclaration( TypeGenerator.Create(property.Type), Identifier(property.Name)) .AddAccessorListAccessors(AccessorDeclaration(SyntaxKind.GetAccessorDeclaration). WithSemicolonToken(Token(SyntaxKind.SemicolonToken))); if (property.PropertyType == PropertyTypes.GetAndSet) { propertyDeclaration = propertyDeclaration.AddAccessorListAccessors(AccessorDeclaration(SyntaxKind.SetAccessorDeclaration). WithSemicolonToken(Token(SyntaxKind.SemicolonToken))); } return(propertyDeclaration); }
public override double GetCost() { return(AutoProperty.GetCost() + 6.99); }
public override double GetCost() { return(AutoProperty.GetCost() + 2459.00); }
public override double GetCost() { return(AutoProperty.GetCost() + 3500.0); }