private static DocEntity LookupEntity(DocProject project, string name)
{
// inefficient, but keeps code organized
foreach (DocSection section in project.Sections)
{
foreach (DocSchema schema in section.Schemas)
{
foreach (DocEntity entity in schema.Entities)
{
if (entity.Name.Equals(name))
{
return entity;
}
}
}
}
return null;
}