Exemplo n.º 1
0
 //TODO: Validation rules for this property
 public static PropertyApiDescriptionModel Create(PropertyInfo propertyInfo)
 {
     return(new PropertyApiDescriptionModel
     {
         Name = propertyInfo.Name,
         Type = ApiTypeNameHelper.GetTypeName(propertyInfo.PropertyType),
         TypeSimple = ApiTypeNameHelper.GetSimpleTypeName(propertyInfo.PropertyType)
     });
 }
Exemplo n.º 2
0
 //TODO: Validation rules for this property
 public static PropertyApiDescriptionModel Create(PropertyInfo propertyInfo)
 {
     return(new PropertyApiDescriptionModel
     {
         Name = propertyInfo.Name,
         Type = ApiTypeNameHelper.GetTypeName(propertyInfo.PropertyType),
         TypeSimple = ApiTypeNameHelper.GetSimpleTypeName(propertyInfo.PropertyType),
         IsRequired = propertyInfo.IsDefined(typeof(RequiredAttribute), true)
     });
 }
Exemplo n.º 3
0
 //TODO: Validation rules for this property
 public static PropertyApiDescriptionModel Create(PropertyInfo propertyInfo)
 {
     return(new PropertyApiDescriptionModel
     {
         Name = propertyInfo.Name,
         JsonName = AbpApiProxyScriptingOptions.PropertyNameGenerator.Invoke(propertyInfo),
         Type = ApiTypeNameHelper.GetTypeName(propertyInfo.PropertyType),
         TypeSimple = ApiTypeNameHelper.GetSimpleTypeName(propertyInfo.PropertyType),
         IsRequired = propertyInfo.IsDefined(typeof(RequiredAttribute), true)
     });
 }