public Compose ( object entity, string field, string format, string value = null ) : string | ||
entity | object | |
field | string | |
format | string | |
value | string | |
리턴 | string |
public string Compose(object entity, string field, string format, string value = null)
{
var result = (entity != null && !field.IsNullOrEmpty()) ? FormatHelper.ToString(PropertyHelper.GetValue(entity, field), DateTimeFormat) : (value ?? string.Empty);
if (!format.IsNullOrEmpty()) result = String.Format(format, result);
return result;
}