/// <summary> /// This constructor allows primitive data to be passed for all /// primitive elements. It will create new object wrappers for /// the primitive data and set other elements to references to /// the given objects /// </summary> public Attribute(byte[] type_, _SetOfAttributeValue vals_ ) : base() { type = new AttributeDescription (type_); vals = vals_; SetKey (_Lightweight_Directory_Access_Protocol_V3Values._rtkey); }
/// <summary> /// This constructor allows primitive data to be passed for all /// primitive elements. It will create new object wrappers for /// the primitive data and set other elements to references to /// the given objects /// </summary> public Attribute(byte[] type_, _SetOfAttributeValue vals_ ) : base() { type = new AttributeDescription(type_); vals = vals_; SetKey(_Lightweight_Directory_Access_Protocol_V3Values._rtkey); }
public override void Decode (Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) { int llen = (explicitTagging) ? MatchTag(buffer, Asn1Tag.SEQUENCE) : implicitLength; Init(); // decode SEQUENCE Asn1BerDecodeContext _context = new Asn1BerDecodeContext(buffer, llen); IntHolder elemLen = new IntHolder(); // decode type if (_context.MatchElemTag(Asn1Tag.UNIV, Asn1Tag.PRIM, 4, elemLen, false)) { type = new AttributeDescription(); type.Decode(buffer, true, elemLen.mValue); } else { throw new Asn1MissingRequiredException(buffer); } // decode vals if (_context.MatchElemTag(Asn1Tag.UNIV, Asn1Tag.CONS, 17, elemLen, false)) { vals = new _SetOfAttributeValue(); vals.Decode(buffer, true, elemLen.mValue); } else { throw new Asn1MissingRequiredException(buffer); } if (explicitTagging && llen == Asn1Status.INDEFLEN) { MatchTag(buffer, Asn1Tag.EOC); } }
public override void Decode(Asn1BerDecodeBuffer buffer, bool explicitTagging, int implicitLength) { int llen = (explicitTagging) ? MatchTag (buffer, Asn1Tag.SEQUENCE) : implicitLength; Init (); // decode SEQUENCE Asn1BerDecodeContext _context = new Asn1BerDecodeContext (buffer, llen); IntHolder elemLen = new IntHolder(); // decode type if (_context.MatchElemTag (Asn1Tag.UNIV, Asn1Tag.PRIM, 4, elemLen, false)) { type = new AttributeDescription(); type.Decode (buffer, true, elemLen.mValue); } else throw new Asn1MissingRequiredException (buffer); // decode vals if (_context.MatchElemTag (Asn1Tag.UNIV, Asn1Tag.CONS, 17, elemLen, false)) { vals = new _SetOfAttributeValue(); vals.Decode (buffer, true, elemLen.mValue); } else throw new Asn1MissingRequiredException (buffer); if (explicitTagging && llen == Asn1Status.INDEFLEN) { MatchTag (buffer, Asn1Tag.EOC); } }
public void Init() { type = null; vals = null; }