Esempio n. 1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RfcMatchingRuleAssertion"/> class.
        /// Creates a MatchingRuleAssertion.
        /// The value null may be passed for an optional value that is not used.
        /// </summary>
        /// <param name="matchingRule">Optional matching rule.</param>
        /// <param name="type">Optional attribute description.</param>
        /// <param name="matchValue">The assertion value.</param>
        /// <param name="dnAttributes">Asn1Boolean value. (default false)</param>
        public RfcMatchingRuleAssertion(
            RfcLdapString matchingRule,
            RfcLdapString type,
            Asn1OctetString matchValue,
            Asn1Boolean dnAttributes = null)
            : base(4)
        {
            if (matchingRule != null)
            {
                Add(new Asn1Tagged(new Asn1Identifier(1), matchingRule, false));
            }
            if (type != null)
            {
                Add(new Asn1Tagged(new Asn1Identifier(2), type, false));
            }

            Add(new Asn1Tagged(new Asn1Identifier(3), matchValue, false));

            // if dnAttributes if false, that is the default value and we must not
            // encode it. (See RFC 2251 5.1 number 4)
            if (dnAttributes != null && dnAttributes.BooleanValue())
            {
                Add(new Asn1Tagged(new Asn1Identifier(4), dnAttributes, false));
            }
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcLdapResult"/> class.
 /// Constructs an RfcLdapResult from parameters
 /// </summary>
 /// <param name="resultCode">the result code of the operation</param>
 /// <param name="matchedDN">the matched DN returned from the server</param>
 /// <param name="errorMessage">the diagnostic message returned from the server</param>
 /// <param name="referral">the referral(s) returned by the server</param>
 public RfcLdapResult(Asn1Enumerated resultCode, RfcLdapDN matchedDN, RfcLdapString errorMessage, Asn1SequenceOf referral = null)
     : base(4)
 {
     Add(resultCode);
     Add(matchedDN);
     Add(errorMessage);
     if (referral != null)
     {
         Add(referral);
     }
 }
Esempio n. 3
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcAttributeValueAssertion" /> class.
 /// Creates an Attribute Value Assertion.
 /// </summary>
 /// <param name="ad">The assertion description</param>
 /// <param name="av">The assertion value</param>
 public RfcAttributeValueAssertion(RfcLdapString ad, Asn1OctetString av)
     : base(2)
 {
     Add(ad);
     Add(av);
 }
Esempio n. 4
0
 public RfcSubstringFilter(RfcLdapString type, Asn1SequenceOf substrings)
     : base(2)
 {
     Add(type);
     Add(substrings);
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcModifyResponse"/> class.
 /// </summary>
 /// <param name="resultCode">the result code of the operation</param>
 /// <param name="matchedDN">the matched DN returned from the server</param>
 /// <param name="errorMessage">the diagnostic message returned from the server</param>
 public RfcModifyResponse(Asn1Enumerated resultCode, RfcLdapDN matchedDN, RfcLdapString errorMessage)
     : base(resultCode, matchedDN, errorMessage)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RfcSearchResultDone"/> class.
 /// Constructs an RfcSearchResultDone from parameters.
 /// </summary>
 /// <param name="resultCode">the result code of the operation</param>
 /// <param name="matchedDN">the matched DN returned from the server</param>
 /// <param name="errorMessage">the diagnostic message returned from the server</param>
 /// <param name="referral">the referral(s) returned by the server</param>
 public RfcSearchResultDone(Asn1Enumerated resultCode, RfcLdapDN matchedDN, RfcLdapString errorMessage, Asn1SequenceOf referral)
     : base(resultCode, matchedDN, errorMessage, referral)
 {
 }