/// <summary> Create an RfcLdapMessage by copying the content array /// /// </summary> /// <param name="origContent">the array list to copy /// </param> /* package */ internal RfcLdapMessage(Asn1Object[] origContent, RfcRequest origRequest, string dn, string filter, bool reference) : base(origContent, origContent.Length) { set_Renamed(0, new RfcMessageID()); // MessageID has static counter RfcRequest req = (RfcRequest)origContent[1]; RfcRequest newreq = req.dupRequest(dn, filter, reference); op = (Asn1Object)newreq; set_Renamed(1, (Asn1Object)newreq); }
/// <summary> Create an RfcLdapMessage request from input parameters.</summary> public RfcLdapMessage(RfcRequest op, RfcControls controls) : base(3) { this.op = (Asn1Object)op; this.controls = controls; add(new RfcMessageID()); // MessageID has static counter add((Asn1Object)op); if (controls != null) { add(controls); } }
/// <summary> /// Creates an LdapMessage when sending a protocol operation and sends /// some optional controls with the message. /// </summary> /// <param name="op"> /// The operation type of message. /// </param> /// <param name="controls"> /// The controls to use with the operation. /// </param> /// <seealso cref="Type"> /// </seealso> /*package*/ internal LdapMessage(int type, RfcRequest op, LdapControl[] controls) { // Get a unique number for this request message messageType = type; RfcControls asn1Ctrls = null; if (controls != null) { // Move LdapControls into an RFC 2251 Controls object. asn1Ctrls = new RfcControls(); for (var i = 0; i < controls.Length; i++) { // asn1Ctrls.add(null); asn1Ctrls.add(controls[i].Asn1Object); } } // create RFC 2251 LdapMessage message = new RfcLdapMessage(op, asn1Ctrls); }
/// <summary> Create an RfcLdapMessage using the specified Ldap Request.</summary> public RfcLdapMessage(RfcRequest op) : this(op, null) { }
/// <summary> Creates an LdapMessage when sending a protocol operation and sends /// some optional controls with the message. /// /// </summary> /// <param name="op">The operation type of message. /// /// </param> /// <param name="controls">The controls to use with the operation. /// /// </param> /// <seealso cref="Type"> /// </seealso> /*package*/ internal LdapMessage(int type, RfcRequest op, LdapControl[] controls) { // Get a unique number for this request message messageType = type; RfcControls asn1Ctrls = null; if (controls != null) { // Move LdapControls into an RFC 2251 Controls object. asn1Ctrls = new RfcControls(); for (int i = 0; i < controls.Length; i++) { // asn1Ctrls.add(null); asn1Ctrls.add(controls[i].Asn1Object); } } // create RFC 2251 LdapMessage message = new RfcLdapMessage(op, asn1Ctrls); return ; }
/// <summary> Create an RfcLdapMessage using the specified Ldap Request.</summary> public RfcLdapMessage(RfcRequest op) : this(op, null) { return ; }
/// <summary> Create an RfcLdapMessage by copying the content array /// /// </summary> /// <param name="origContent">the array list to copy /// </param> /* package */ internal RfcLdapMessage(Asn1Object[] origContent, RfcRequest origRequest, System.String dn, System.String filter, bool reference) : base(origContent, origContent.Length) { set_Renamed(0, new RfcMessageID()); // MessageID has static counter RfcRequest req = (RfcRequest) origContent[1]; RfcRequest newreq = req.dupRequest(dn, filter, reference); op = (Asn1Object) newreq; set_Renamed(1, (Asn1Object) newreq); return ; }
/// <summary> Create an RfcLdapMessage request from input parameters.</summary> public RfcLdapMessage(RfcRequest op, RfcControls controls) : base(3) { this.op = (Asn1Object) op; this.controls = controls; add(new RfcMessageID()); // MessageID has static counter add((Asn1Object) op); if (controls != null) { add(controls); } return ; }