Add support for Property and Method attributes (#49)
* . * . * P en E * .
This commit is contained in:
@@ -110,6 +110,11 @@ using System;
|
||||
propertyName = $"this[{string.Join(", ", methodParameters)}]";
|
||||
}
|
||||
|
||||
foreach (var attribute in property.GetAttributesAsList())
|
||||
{
|
||||
str.AppendLine($" {attribute}");
|
||||
}
|
||||
|
||||
str.AppendLine($" {getterSetter.Value.PropertyType} {propertyName} {getterSetter.Value.GetSet}");
|
||||
str.AppendLine();
|
||||
}
|
||||
@@ -125,6 +130,11 @@ using System;
|
||||
var methodParameters = GetMethodParameters(method.Parameters, true);
|
||||
var whereStatement = GetWhereStatementFromMethod(method);
|
||||
|
||||
foreach (var attribute in method.GetAttributesAsList())
|
||||
{
|
||||
str.AppendLine($" {attribute}");
|
||||
}
|
||||
|
||||
str.AppendLine($" {GetReplacedType(method.ReturnType, out _)} {method.GetMethodNameWithOptionalTypeParameters()}({string.Join(", ", methodParameters)}){whereStatement};");
|
||||
str.AppendLine();
|
||||
}
|
||||
@@ -139,6 +149,12 @@ using System;
|
||||
{
|
||||
var ps = @event.First().Parameters.First();
|
||||
var type = ps.GetTypeEnum() == TypeEnum.Complex ? GetParameterType(ps, out _) : ps.Type.ToString();
|
||||
|
||||
foreach (var attribute in ps.GetAttributesAsList())
|
||||
{
|
||||
str.AppendLine($" {attribute}");
|
||||
}
|
||||
|
||||
str.AppendLine($" event {type} {@event.Key.GetSanitizedName()};");
|
||||
str.AppendLine();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user