Beispiel #1
0
 public override void setParentAnnotated(ICustomAttributeProvider parent)
 {
     if (parent != null)
     {
         if (CoderUtils.isAttributePresent <ASN1String>(parent))
         {
             ASN1String value = CoderUtils.getAttribute <ASN1String>(parent);
             stringType = value.StringType;
         }
     }
 }
Beispiel #2
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);
        }
Beispiel #3
0
 public ASN1StringMetadata(ASN1String annotation)
     : this(annotation.Name, annotation.IsUCS, annotation.StringType)
 {
 }