private static bool IsCompound(BaseUsage usage)
{
MetadataAttributeManager mam = new MetadataAttributeManager();
if (usage is MetadataAttributeUsage)
{
MetadataAttributeUsage mau = (MetadataAttributeUsage)usage;
MetadataAttribute ma = mam.MetadataAttributeRepo.Get(mau.MetadataAttribute.Id);
if (ma.Self is MetadataCompoundAttribute) return true;
}
if (usage is MetadataNestedAttributeUsage)
{
MetadataNestedAttributeUsage mnau = (MetadataNestedAttributeUsage)usage;
MetadataAttribute ma = mam.MetadataAttributeRepo.Get(mnau.Member.Id);
if (ma.Self is MetadataCompoundAttribute) return true;
}
return false;
}