private static void FormatEntityUsage(DocProject docProject, DocEntity entity, DocConceptRoot docRoot, DocTemplateUsage eachusage, Dictionary<string, DocObject> mapEntity, Dictionary<string, string> mapSchema, List<ContentRef> listFigures, List<ContentRef> listTables, Dictionary<DocObject, bool> included, StringBuilder sb, string path, DocPublication docPublication)
{
if (eachusage.Definition != null)
{
if (included == null || included.ContainsKey(eachusage.Definition))
{
if (eachusage.Documentation != null)
{
eachusage.Documentation = UpdateNumbering(eachusage.Documentation, listFigures, listTables, entity);
}
string eachtext = FormatConcept(docProject, entity, docRoot, eachusage, mapEntity, mapSchema, listFigures, listTables, path, docPublication);
sb.Append(eachtext);
sb.AppendLine();
if (eachusage.Concepts.Count > 0)
{
sb.AppendLine("<details>");
sb.AppendLine("<summary>Concept alternates</summary>");
foreach (DocTemplateUsage innerusage in eachusage.Concepts)
{
FormatEntityUsage(docProject, entity, docRoot, innerusage, mapEntity, mapSchema, listFigures, listTables, included, sb, path, docPublication);
}
sb.AppendLine("</details>");
}
}
}
}