Ejemplo n.º 1
0
        public static int getStringTagForElement(ElementInfo elementInfo)
        {
            int result = UniversalTags.PrintableString;

            if (elementInfo.hasPreparedInfo())
            {
                result = ((ASN1StringMetadata)elementInfo.PreparedInfo.TypeMetadata).StringType;
            }
            else if (elementInfo.isAttributePresent <ASN1String>())
            {
                ASN1String val = elementInfo.getAttribute <ASN1String>();
                result = val.StringType;
            }
            else if (elementInfo.ParentAnnotatedClass != null && elementInfo.isParentAttributePresent <ASN1String>())
            {
                ASN1String value = elementInfo.getParentAttribute <ASN1String>();
                result = value.StringType;
            }
            return(result);
        }