C# Class Novell.Directory.Ldap.Utilclass.RDN

A RDN encapsulates a single object's name of a Distinguished Name(DN). The object name represented by this class contains no context. Thus a Relative Distinguished Name (RDN) could be relative to anywhere in the Directories tree. For example, of following DN, 'cn=admin, ou=marketing, o=corporation', all possible RDNs are 'cn=admin', 'ou=marketing', and 'o=corporation'. Multivalued attributes are encapsulated in this class. For example the following could be represented by an RDN: 'cn=john + l=US', or 'cn=juan + l=ES'
Inheritance: System.Object
Mostrar archivo Open project: EventStore/csharp-ldap Class Usage Examples

Public Methods

Method Description
RDN ( ) : System
RDN ( System rdn ) : System

Creates an RDN object from the DN component specified in the string RDN

ToString ( ) : System.String

Creates a string that represents this RDN, according to RFC 2253

add ( System attrType, System attrValue, System rawValue ) : void

Adds another value to the RDN. Only one attribute type is allowed for the RDN.

explodeRDN ( bool noTypes ) : System.String[]

Returns each multivalued name in the current RDN as an array of Strings.

Private Methods

Method Description
equalAttrType ( System attr1, System attr2 ) : bool

Internal function used by equal to compare Attribute types. Because attribute types could either be an OID or a name. There needs to be a Translation mechanism. This function will absract this functionality. Currently if types differ (Oid and number) then UnsupportedOperation is thrown, either one or the other must used. In the future an OID to name translation can be used.

equals ( RDN rdn ) : bool
toString ( bool noTypes ) : System.String

Method Details

RDN() public method

public RDN ( ) : System
return System

RDN() public method

Creates an RDN object from the DN component specified in the string RDN
public RDN ( System rdn ) : System
rdn System the DN component ///
return System

ToString() public method

Creates a string that represents this RDN, according to RFC 2253
public ToString ( ) : System.String
return System.String

add() public method

Adds another value to the RDN. Only one attribute type is allowed for the RDN.
public add ( System attrType, System attrValue, System rawValue ) : void
attrType System Attribute type, could be an OID or String ///
attrValue System Attribute Value, must be normalized and escaped ///
rawValue System or text before normalization, can be Null ///
return void

explodeRDN() public method

Returns each multivalued name in the current RDN as an array of Strings.
public explodeRDN ( bool noTypes ) : System.String[]
noTypes bool Specifies whether Attribute types are included. The attribute /// type names will be ommitted if the parameter noTypes is true. /// ///
return System.String[]