1 /******************************************************************************
3 * Copyright (c) 2003 Novell Inc. www.novell.com
5 * Permission is hereby granted, free of charge, to any person obtaining a copy
6 * of this software and associated documentation files (the Software), to deal
7 * in the Software without restriction, including without limitation the rights
8 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 * copies of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be included in
13 * all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 *******************************************************************************/
24 // Novell.Directory.Ldap.LdapCompareRequest.cs
27 // Sunil Kumar (Sunilk@novell.com)
29 // (C) 2003 Novell, Inc (http://www.novell.com)
33 using Novell.Directory.Ldap.Rfc2251;
35 namespace Novell.Directory.Ldap
38 /// <summary> Represents an Ldap Compare Request.
41 /// <seealso cref="LdapConnection.SendRequest">
44 * CompareRequest ::= [APPLICATION 14] SEQUENCE {
46 * ava AttributeValueAssertion }
48 public class LdapCompareRequest:LdapMessage
50 /// <summary> Returns the LdapAttribute associated with this request.
53 /// <returns> the LdapAttribute
55 virtual public System.String AttributeDescription
59 RfcCompareRequest req = (RfcCompareRequest) Asn1Object.getRequest();
60 return req.AttributeValueAssertion.AttributeDescription;
64 /// <summary> Returns the LdapAttribute associated with this request.
67 /// <returns> the LdapAttribute
69 [CLSCompliantAttribute(false)]
70 virtual public sbyte[] AssertionValue
74 RfcCompareRequest req = (RfcCompareRequest) Asn1Object.getRequest();
75 return req.AttributeValueAssertion.AssertionValue;
79 /// <summary> Returns of the dn of the entry to compare in the directory
82 /// <returns> the dn of the entry to compare
84 virtual public System.String DN
88 return Asn1Object.RequestDN;
92 /// <summary> Constructs an LdapCompareRequest Object.
95 /// <param name="dn"> The distinguished name of the entry containing an
96 /// attribute to compare.
99 /// <param name="name"> The name of the attribute to compare.
102 /// <param name="value"> The value of the attribute to compare.
106 /// <param name="cont">Any controls that apply to the compare request,
109 [CLSCompliantAttribute(false)]
110 public LdapCompareRequest(System.String dn, System.String name, sbyte[] value_Renamed, LdapControl[] cont):base(LdapMessage.COMPARE_REQUEST, new RfcCompareRequest(new RfcLdapDN(dn), new RfcAttributeValueAssertion(new RfcAttributeDescription(name), new RfcAssertionValue(value_Renamed))), cont)