Beispiel #1
0
        private void AddTableAttribute()
        {
            var tableAttribute = CreateSchemaAttribute(Constants.Table);

            if (tableAttribute == null)
            {
                return;
            }

            var tableName = classDeclaration.NameIdentifier.Name.MorphemToManies();
            var tableAttributeArgument = factory.CreateArgument(ParameterKind.VALUE, factory.CreateStringLiteralExpression($"{tableName}"));

            tableAttribute.AddArgumentAfter(tableAttributeArgument, null);

            classDeclaration.AddAttributeBefore(tableAttribute, null);
        }
Beispiel #2
0
 public IAttribute AddAttributeBefore(IAttribute param, IAttribute anchor)
 {
     return(_classDeclaration.AddAttributeBefore(param, anchor));
 }