/// <summary> Asynchronously makes a set of changes to an existing entry in the /// directory, using the specified constraints and queue. /// /// For example, this modify method can change attribute values, add new /// attribute values, or remove existing attribute values. /// /// Because the server applies all changes in an LdapModification array /// atomically, the application can expect that no changes /// have been performed if an error is returned. /// If the request fails with {@link LdapException.CONNECT_ERROR}, /// it is indeterminate whether or not the server made the modifications. /// /// </summary> /// <param name="dn"> The distinguished name of the entry to modify. /// /// </param> /// <param name="mods"> The changes to be made to the entry. /// /// </param> /// <param name="queue"> The queue for messages returned from a server in /// response to this request. If it is null, a /// queue object is created internally. /// /// </param> /// <param name="cons"> Constraints specific to the operation. /// /// </param> /// <exception> LdapException A general exception which includes an error /// message and an Ldap error code. /// </exception> public virtual LdapResponseQueue Modify(System.String dn, LdapModification[] mods, LdapResponseQueue queue, LdapConstraints cons) { if ((System.Object) dn == null) { // Invalid DN parameter throw new System.ArgumentException(ExceptionMessages.DN_PARAM_ERROR); } if (cons == null) cons = defSearchCons; LdapMessage msg = new LdapModifyRequest(dn, mods, cons.getControls()); return SendRequestToServer(msg, cons.TimeLimit, queue, null); }