目标:XFEExtension.NetCore.AutonConfig
代码:XFE0002
级别:❌️ 警告
描述:设置了自定义的Get方法但是没有返回值
在配置类的字段上应用了 ProfilePropertyAddGet 特性,在应用此特性的时候代码生成器不再会自动生成该字段对应的属性的 get 方法中的 return 字段名称; 这一条方法,没有了返回值程序会报错,因此在添加 ProfilePropertyAddGet 特性之后必须在众多的(如果有) ProfilePropertyAddGet 特性中确保有一条特性中存在 return 语法
ProfilePropertyAddGet 特性,向其中添加 return 方法[ProfilePropertyAddGet("//something to do..1")]
[ProfilePropertyAddGet("//something to do..2")]
[ProfilePropertyAddGet("//something to do..3")]
[ProfilePropertyAddGet("return myField")] //添加一个新的特性并向其中添加return方法
private static string myField
ProfilePropertyAddGet 特性,设置 return 方法[ProfilePropertyAddGet("return myField")] //修改原来的特性中的方法
private static string myField