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

ComposeIcon() public static method

public static ComposeIcon ( this smartfield, object entity, string value, string field, string format ) : string
smartfield this
entity object
value string
field string
format string
return string
        public static string ComposeIcon(this SmartField smartfield, object entity, string value, string field, string format)
        {
            if (smartfield == null) throw new ArgumentNullException("smartfield");

            var result = (entity != null && !field.IsNullOrEmpty()) ? PropertyHelper.GetValue(entity, field).ToString() : value;
            if (!format.IsNullOrEmpty()) result = String.Format(format, result);

            return result;
        }