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

ComposeIcon() public static method

public static ComposeIcon ( object entity, string value, string field, string format ) : string
entity object
value string
field string
format string
return string
        public static string ComposeIcon(object entity, string value, string field, string format)
        {
            if (entity == null || field.IsNullOrEmpty()) return String.Format(format, value);

            var signed = field.StartsWith("!");
            var iconField = signed ? field.Substring(1) : field;

            return String.Format(format, signed ^ Convert.ToBoolean(PropertyHelper.GetValue(entity, iconField)));
        }