Esempio n. 1
0
        // *************************************************************************
        // Constructors for BindRequest
        // *************************************************************************

        /// <summary> </summary>
        public RfcBindRequest(Asn1Integer version, RfcLdapDn name, RfcAuthenticationChoice auth)
            : base(3)
        {
            Add(version);
            Add(name);
            Add(auth);
        }
        // *************************************************************************
        // Constructor for CompareRequest
        // *************************************************************************

        /// <summary> </summary>
        public RfcCompareRequest(RfcLdapDn entry, RfcAttributeValueAssertion ava)
            : base(2)
        {
            Add(entry);
            Add(ava);
            if (ava.AssertionValue == null)
            {
                throw new ArgumentException("compare: Attribute must have an assertion value");
            }
        }
Esempio n. 3
0
 /// <summary>
 ///     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,
                      RfcReferral referral)
     : base(4)
 {
     Add(resultCode);
     Add(matchedDn);
     Add(errorMessage);
     if (referral != null)
     {
         Add(referral);
     }
 }
Esempio n. 4
0
 /// <summary> </summary>
 public RfcModifyDnRequest(RfcLdapDn entry, RfcRelativeLdapDn newrdn, Asn1Boolean deleteoldrdn,
                           RfcLdapDn newSuperior)
     : base(4)
 {
     Add(entry);
     Add(newrdn);
     Add(deleteoldrdn);
     if (newSuperior != null)
     {
         newSuperior.SetIdentifier(new Asn1Identifier(Asn1Identifier.Context, false, 0));
         Add(newSuperior);
     }
 }
        // *************************************************************************
        // Constructors for SearchRequest
        // *************************************************************************

        /*
         *
         */

        public RfcSearchRequest(RfcLdapDn baseObject, Asn1Enumerated scope, Asn1Enumerated derefAliases,
                                Asn1Integer sizeLimit, Asn1Integer timeLimit, Asn1Boolean typesOnly, RfcFilter filter,
                                RfcAttributeDescriptionList attributes)
            : base(8)
        {
            Add(baseObject);
            Add(scope);
            Add(derefAliases);
            Add(sizeLimit);
            Add(timeLimit);
            Add(typesOnly);
            Add(filter);
            Add(attributes);
        }
 /// <summary>
 ///     Constructs an RfcModifyResponse 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 RfcModifyResponse(Asn1Enumerated resultCode, RfcLdapDn matchedDn, RfcLdapString errorMessage,
                          RfcReferral referral)
     : base(resultCode, matchedDn, errorMessage, referral)
 {
 }
Esempio n. 7
0
        // *************************************************************************
        // Constructors for RfcLdapResult
        // *************************************************************************

        /// <summary>
        ///     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>
        public RfcLdapResult(Asn1Enumerated resultCode, RfcLdapDn matchedDn, RfcLdapString errorMessage)
            : this(resultCode, matchedDn, errorMessage, null)
        {
        }
Esempio n. 8
0
        // *************************************************************************
        // Constructors for ModifyDNRequest
        // *************************************************************************

        /// <summary> </summary>
        public RfcModifyDnRequest(RfcLdapDn entry, RfcRelativeLdapDn newrdn, Asn1Boolean deleteoldrdn)
            : this(entry, newrdn, deleteoldrdn, null)
        {
        }
Esempio n. 9
0
 /// <summary>
 ///     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,
                            RfcReferral referral)
     : base(resultCode, matchedDn, errorMessage, referral)
 {
 }
        // *************************************************************************
        // Constructors for AddRequest
        // *************************************************************************

        /// <summary>
        ///     Constructs an RFCAddRequest.
        /// </summary>
        /// <param name="entry">
        ///     the entry.
        /// </param>
        /// <param name="attributes">
        ///     the Attributes making up the Entry.
        /// </param>
        public RfcAddRequest(RfcLdapDn entry, RfcAttributeList attributes)
            : base(2)
        {
            Add(entry);
            Add(attributes);
        }
Esempio n. 11
0
        // *************************************************************************
        // Constructor for ModifyRequest
        // *************************************************************************

        /// <summary> </summary>
        public RfcModifyRequest(RfcLdapDn objectRenamed, Asn1SequenceOf modification)
            : base(2)
        {
            Add(objectRenamed);
            Add(modification);
        }