예제 #1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcControl"/> class.
 /// Note: criticality is only added if true, as per RFC 2251 sec 5.1 part
 /// (4): If a value of a type is its default value, it MUST be
 /// absent.
 /// </summary>
 /// <param name="controlType">Type of the control.</param>
 /// <param name="criticality">The criticality.</param>
 /// <param name="controlValue">The control value.</param>
 public RfcControl(RfcLdapOID controlType, Asn1Boolean criticality, Asn1OctetString controlValue)
     : base(3)
 {
     Add(controlType);
     if (criticality.BooleanValue())
     {
         Add(criticality);
     }
     if (controlValue != null)
     {
         Add(controlValue);
     }
 }
예제 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcControl"/> class.
 /// </summary>
 /// <param name="controlType">Type of the control.</param>
 /// <param name="criticality">The criticality.</param>
 public RfcControl(RfcLdapOID controlType, Asn1Boolean criticality = null)
     : this(controlType, criticality ?? new Asn1Boolean(false), null)
 {
 }