public PropertyUpdateDetailMenu(PropertyInfo property, Object obj) : base(TITEL_TEMPLATE, new List <string>()) { this.BPropertyAttr = HelpMeReflect.AttributeOfType <BProperty>(property); this.Titel = TITEL_TEMPLATE.Replace(PLACEHOLDER, this.BPropertyAttr.Description); this.Property = property; this.Obj = obj; this.Old = HelpMeReflect.PropertyValueString(obj, property); }
protected string BClassToString(IBClass bClass) { List <PropertyInfo> properties = HelpMeReflect.PropertiesWithBPropertyAttribute(bClass.GetType()); StringBuilder sb = new StringBuilder(); foreach (PropertyInfo property in properties) { string propertyName = HelpMeReflect.AttributeOfType <BProperty>(property).Description; string propertyValue = HelpMeReflect.PropertyValueString(bClass, property); sb.Append($"{propertyName}={propertyValue}{DELIMITER}"); } return(sb.ToString()); }