Adf.Web.UI.SmartView.SmartFieldExtensions.Compose C# (CSharp) Method

Compose() public static method

public static Compose ( this smartfield, object entity, string field, string format, string value = null ) : string
smartfield this
entity object
field string
format string
value string
return string
        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;
        }