GetConvertedValue() public abstract method

public abstract GetConvertedValue ( DerObjectIdentifier oid, string value ) : Asn1Object
oid DerObjectIdentifier
value string
return Asn1Object
Esempio n. 1
0
        public override Asn1Object ToAsn1Object()
        {
            if (_seq == null)
            {
                var vec  = new Asn1EncodableVector();
                var sVec = new Asn1EncodableVector();
                DerObjectIdentifier lstOid = null;

                for (var i = 0; i != _ordering.Count; i++)
                {
                    var oid = (DerObjectIdentifier)_ordering[i];
                    var str = (string)_values[i];

                    if (lstOid != null && (!((bool)_added[i])))
                    {
                        vec.Add(new DerSet(sVec));
                        sVec = new Asn1EncodableVector();
                    }

                    sVec.Add(new DerSequence(oid, _converter.GetConvertedValue(oid, str)));

                    lstOid = oid;
                }

                vec.Add(new DerSet(sVec));

                _seq = new DerSequence(vec);
            }

            return(_seq);
        }
Esempio n. 2
0
        public override Asn1Object ToAsn1Object()
        {
            if (seq == null)
            {
                Asn1EncodableVector vec    = new Asn1EncodableVector();
                Asn1EncodableVector sVec   = new Asn1EncodableVector();
                DerObjectIdentifier lstOid = null;

                for (int i = 0; i != ordering.Count; i++)
                {
                    DerObjectIdentifier oid = (DerObjectIdentifier)ordering[i];
                    string str = (string)values[i];

                    if (lstOid == null ||
                        ((bool)this.added[i]))
                    {
                    }
                    else
                    {
                        vec.Add(new DerSet(sVec));
                        sVec = new Asn1EncodableVector();
                    }

                    sVec.Add(
                        new DerSequence(
                            oid,
                            converter.GetConvertedValue(oid, str)));

                    lstOid = oid;
                }

                vec.Add(new DerSet(sVec));

                seq = new DerSequence(vec);
            }

            return(seq);
        }
Esempio n. 3
0
 public override Asn1Object ToAsn1Object()
 {
     if (seq == null)
     {
         Asn1EncodableVector asn1EncodableVector  = new Asn1EncodableVector();
         Asn1EncodableVector asn1EncodableVector2 = new Asn1EncodableVector();
         DerObjectIdentifier derObjectIdentifier  = null;
         for (int i = 0; i != ((global::System.Collections.ICollection)ordering).get_Count(); i++)
         {
             DerObjectIdentifier derObjectIdentifier2 = (DerObjectIdentifier)ordering.get_Item(i);
             string value = (string)values.get_Item(i);
             if (derObjectIdentifier != null && !(bool)added.get_Item(i))
             {
                 asn1EncodableVector.Add(new DerSet(asn1EncodableVector2));
                 asn1EncodableVector2 = new Asn1EncodableVector();
             }
             asn1EncodableVector2.Add(new DerSequence(derObjectIdentifier2, converter.GetConvertedValue(derObjectIdentifier2, value)));
             derObjectIdentifier = derObjectIdentifier2;
         }
         asn1EncodableVector.Add(new DerSet(asn1EncodableVector2));
         seq = new DerSequence(asn1EncodableVector);
     }
     return(seq);
 }
Esempio n. 4
0
 public override Asn1Object ToAsn1Object()
 {
     if (seq == null)
     {
         Asn1EncodableVector asn1EncodableVector  = new Asn1EncodableVector();
         Asn1EncodableVector asn1EncodableVector2 = new Asn1EncodableVector();
         DerObjectIdentifier derObjectIdentifier  = null;
         for (int i = 0; i != ordering.Count; i++)
         {
             DerObjectIdentifier derObjectIdentifier2 = (DerObjectIdentifier)ordering[i];
             string value = (string)values[i];
             if (derObjectIdentifier != null && !(bool)added[i])
             {
                 asn1EncodableVector.Add(new DerSet(asn1EncodableVector2));
                 asn1EncodableVector2 = new Asn1EncodableVector();
             }
             asn1EncodableVector2.Add(new DerSequence(derObjectIdentifier2, converter.GetConvertedValue(derObjectIdentifier2, value)));
             derObjectIdentifier = derObjectIdentifier2;
         }
         asn1EncodableVector.Add(new DerSet(asn1EncodableVector2));
         seq = new DerSequence(asn1EncodableVector);
     }
     return(seq);
 }