");
+ html.AppendLine($" ");
+
+ if (diff.IsCreate())
+ {
+ html.AppendLine($"
");
+ html.AppendLine($"
New {diff.EntityType}
");
+ html.AppendLine($"
{System.Net.WebUtility.HtmlEncode(diff.AfterData ?? "")}");
+ html.AppendLine($"
");
+ }
+ else if (diff.IsDelete())
+ {
+ html.AppendLine($"
");
+ html.AppendLine($"
Deleted {diff.EntityType}
");
+ html.AppendLine($"
{System.Net.WebUtility.HtmlEncode(diff.BeforeData ?? "")}");
+ html.AppendLine($"
");
+ }
+ else if (diff.IsUpdate())
+ {
+ html.AppendLine($"
");
+ html.AppendLine($"
Changed Fields ({diff.ChangedFields.Count})
");
+ html.AppendLine($"
");
+ html.AppendLine($" ");
+ html.AppendLine($" ");
+ html.AppendLine($" | Field | ");
+ html.AppendLine($" Old Value | ");
+ html.AppendLine($" New Value | ");
+ html.AppendLine($"
");
+ html.AppendLine($" ");
+ html.AppendLine($" ");
+
+ foreach (var field in diff.ChangedFields)
+ {
+ html.AppendLine($" ");
+ html.AppendLine($" | {System.Net.WebUtility.HtmlEncode(field.DisplayName)} | ");
+ html.AppendLine($" ");
+ html.AppendLine($" {System.Net.WebUtility.HtmlEncode(FormatValue(field.OldValue))}");
+ html.AppendLine($" | ");
+ html.AppendLine($" ");
+ html.AppendLine($" {System.Net.WebUtility.HtmlEncode(FormatValue(field.NewValue))}");
+ html.AppendLine($" | ");
+ html.AppendLine($"
");
+ }
+
+ html.AppendLine($" ");
+ html.AppendLine($"
");
+ html.AppendLine($"
");
+ }
+
+ html.AppendLine("
");
+ return html.ToString();
+ }
+
+ ///