コード例 #1
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="LdapControl" /> class.
        ///     Constructs a new LdapControl object using the specified values.
        /// </summary>
        /// <param name="oid">The OID of the control, as a dotted string.</param>
        /// <param name="critical">
        ///     True if the Ldap operation should be discarded if
        ///     the control is not supported. False if
        ///     the operation can be processed without the control.
        /// </param>
        /// <param name="values">The control-specific data.</param>
        /// <exception cref="ArgumentException">An OID must be specified.</exception>
        public LdapControl(string oid, bool critical, sbyte[] values)
        {
            if (oid == null)
            {
                throw new ArgumentException("An OID must be specified");
            }

            Asn1Object = new RfcControl(oid, new Asn1Boolean(critical), values == null ? null : new Asn1OctetString(values));
        }
コード例 #2
0
 public RfcControls(Stream stream, int len)
     : base(stream, len)
 {
     // Convert each SEQUENCE element to a Control
     for (var i = 0; i < Size(); i++)
     {
         var tempControl = new RfcControl((Asn1Sequence)Get(i));
         Set(i, tempControl);
     }
 }
コード例 #3
0
 public void Set(int index, RfcControl control)
 {
     base.Set(index, control);
 }
コード例 #4
0
 public void Add(RfcControl control)
 {
     base.Add(control);
 }