/// <summary> /// /// </summary> public void ResetModified() { HasChanges = false; foreach (var property in PropertySet) { PropertyHelperUtil.SetField(Instance, $"_{property.Name}IsModified", false); } }
/// <summary> /// Gets list of changed properties. /// </summary> public List <string> GetChanges() { ChangeSet.Clear(); foreach (var property in PropertySet) { if (PropertyHelperUtil.GetField <bool, T>(Instance, $"_{property.Name}IsModified") == true) { ChangeSet.Add(property); } } return(ChangeSet.Select(x => x.Name).ToList()); }
/// <summary> /// /// </summary> public static List <PropertyInfo> GetDataMemberClassProperties <T>() where T : class { var properties = PropertyHelperUtil.GetClassPropertiesWithAttributeAandNotB <T, DataMember, StaticMember>(); return(new List <PropertyInfo>(properties)); }