finished list input + added proper prefix rendering
This commit is contained in:
@@ -17,6 +17,8 @@ public interface IAdminPropertyGenerator<TProperty> {
|
||||
IAdminPropertyGenerator<TProperty> Prefix(string prefix);
|
||||
IAdminPropertyGenerator<TProperty> Validator(Func<object, bool> validator);
|
||||
IAdminPropertyGenerator<TProperty> IsSelector<TSelector>();
|
||||
IAdminPropertyGenerator<TProperty> Parser<TModel>(Func<TModel, string, TProperty> parser);
|
||||
IAdminPropertyGenerator<TProperty> ParserForListType<TModel, TInnerProperty>(Func<TModel, string, TInnerProperty> parser);
|
||||
IAdminPropertyGenerator<TProperty> DisplayProperty<TListingProperty>(Expression<Func<TProperty, TListingProperty>> propertyExpression);
|
||||
IAdminPropertyGenerator<TProperty> DisplayPropertyForListType<TInnerProperty>(Expression<Func<TInnerProperty, object>> propertyExpression);
|
||||
|
||||
|
||||
@@ -76,6 +76,16 @@ internal sealed class AdminPropertyGenerator<TProperty>(string name, Type type)
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAdminPropertyGenerator<TProperty> Parser<TModel>(Func<TModel, string, TProperty> parser) {
|
||||
_property.Parser = (o, s) => parser.Invoke((TModel)o, s);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAdminPropertyGenerator<TProperty> ParserForListType<TModel, TInnerProperty>(Func<TModel, string, TInnerProperty> parser) {
|
||||
_property.Parser = (o, s) => parser.Invoke((TModel)o, s);
|
||||
return this;
|
||||
}
|
||||
|
||||
public IAdminPropertyGenerator<TProperty> DisplayProperty<TListingProperty>(Expression<Func<TProperty, TListingProperty>> propertyExpression) {
|
||||
var property = AdminPageGenerator<object>.GetPropertyInfo(propertyExpression);
|
||||
_property.DisplayPropertyName = property.Name;
|
||||
|
||||
Reference in New Issue
Block a user