private AddPropertyFieldDefinition ( Mono.Cecil.PropertyDefinition property ) : |
||
property | Mono.Cecil.PropertyDefinition | |
리턴 |
private FieldDefinition AddPropertyFieldDefinition(PropertyDefinition property)
{
string fieldName = $"{property.Name}Property";
var declaringType = property.DeclaringType;
var fieldDefinition = new FieldDefinition(fieldName, FieldAttributes.Public | FieldAttributes.Static | FieldAttributes.InitOnly, _catelType.PropertyDataType);
declaringType.Fields.Add(fieldDefinition);
fieldDefinition.MarkAsCompilerGenerated(_msCoreReferenceFinder);
return fieldDefinition;
}