BExIS.Dcm.CreateDatasetWizard.UsageHelper.IsCompound C# (CSharp) Method

IsCompound() private static method

private static IsCompound ( BaseUsage usage ) : bool
usage BaseUsage
return bool
        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;
        }