public static string GetDefaultToBriefStringInformation(this IObjectToBriefString targetObject, uint n) { var spaces = Spaces(n); var nextN = n + 4; var sb = new StringBuilder(); var nameOfType = targetObject.GetType().FullName; sb.AppendLine($"{spaces}Begin {nameOfType}"); sb.Append(targetObject.PropertiesToBriefString(nextN)); sb.AppendLine($"{spaces}End {nameOfType}"); return(sb.ToString()); }
public static void PrintBriefObjProp(this StringBuilder sb, uint n, string propName, IObjectToBriefString obj) { var spaces = Spaces(n); var nextN = n + 4; if (obj == null) { sb.AppendLine($"{spaces}{propName} = NULL"); } else { sb.AppendLine($"{spaces}Begin {propName}"); sb.Append(obj.ToBriefString(nextN)); sb.AppendLine($"{spaces}End {propName}"); } }