public string FormatDefinitions(DocProject docProject, Dictionary<string, DocObject> map, Dictionary<DocObject, bool> included)
{
StringBuilder sb = new StringBuilder();
foreach (DocSection docSection in docProject.Sections)
{
foreach (DocSchema docSchema in docSection.Schemas)
{
foreach (DocType docType in docSchema.Types)
{
bool use = false;
included.TryGetValue(docType, out use);
if (use)
{
if (docType is DocDefined)
{
DocDefined docDefined = (DocDefined)docType;
string text = this.FormatDefined(docDefined);
sb.AppendLine(text);
}
else if (docType is DocSelect)
{
DocSelect docSelect = (DocSelect)docType;
string text = this.FormatSelect(docSelect, null, null);
sb.AppendLine(text);
}
else if (docType is DocEnumeration)
{
DocEnumeration docEnumeration = (DocEnumeration)docType;
string text = this.FormatEnumeration(docEnumeration);
sb.AppendLine(text);
}
}
}
foreach (DocEntity docEntity in docSchema.Entities)
{
bool use = false;
included.TryGetValue(docEntity, out use);
if (use)
{
string text = this.FormatEntity(docEntity, map, included);
sb.AppendLine(text);
}
}
}
}
return sb.ToString();
}