internal static IEnumerable <string> GetChanged(ComplexTypeDelta delta) { List <string> changed = new List <string>(); foreach (KeyValuePair <string, IPropertyDelta> propertyDelta in delta.PropertiesDeltas) { if (!propertyDelta.Value.HasChanged) { continue; } if (propertyDelta.Value is AtomicPropertyDelta) { changed.Add(GetDisplayFieldName(propertyDelta.Key, delta.Type)); } else { changed.AddRange( GetChanged(propertyDelta.Value) .Select(s => GetDisplayFieldName(propertyDelta.Key, delta.Type) + " > " + s) ); } } return(changed); }
public static string GenerateHtmlList(ComplexTypeDelta rootDelta) { return(GetChanged(rootDelta).Aggregate("<ul>", (current, path) => current + $"<li>{path}</li>") + "</ul>"); }