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

GetNameOfType() public static method

public static GetNameOfType ( BaseUsage usage ) : string
usage BaseUsage
return string
        public static string GetNameOfType(BaseUsage usage)
        {
            if (usage is MetadataPackageUsage)
            {
                MetadataPackageUsage mpu = (MetadataPackageUsage)usage;
                return mpu.MetadataPackage.Name;
            }

            if (usage is MetadataAttributeUsage)
            {
                MetadataAttributeUsage mau = (MetadataAttributeUsage)usage;
                return mau.MetadataAttribute.Name;
            }

            if (usage is MetadataNestedAttributeUsage)
            {
                MetadataNestedAttributeUsage mnau = (MetadataNestedAttributeUsage)usage;
                return mnau.Member.Name;
            }

            return "";
        }