public static string Compose(this SmartField smartfield, object entity, string field, string format, string value = null)
{
if (smartfield == null) throw new ArgumentNullException("smartfield");
var result = (entity != null && !field.IsNullOrEmpty()) ? FormatHelper.ToString(PropertyHelper.GetValue(entity, field), breakLongWords:true) : (value ?? string.Empty);
if (!format.IsNullOrEmpty()) result = String.Format(format, result);
return result;
}