Novell.Directory.Ldap.LdapUrl.getDN C# (CSharp) Method

getDN() public method

Returns the base distinguished name encapsulated in the URL.
public getDN ( ) : System.String
return System.String
        public virtual System.String getDN()
        {
            return dn;
        }

Usage Example

		/// <summary>
		/// Initializes the Entry specific properties e.g entry DN etc.
		/// </summary>
		void InitEntry()
		{			
			LdapUrl lUrl = new LdapUrl (ADsPath);
			string dn = lUrl.getDN();
			if (dn != null ) {
				if (String.Compare (dn,"rootDSE",true) == 0)
					InitToRootDse (lUrl.Host,lUrl.Port);
				else {
				DN userDn = new DN (dn);
				String[] lRdn = userDn.explodeDN(false);
				_Name = (string)lRdn[0];
				_Parent = new DirectoryEntry(conn);
				_Parent.Path = GetLdapUrlString (lUrl.Host,lUrl.Port,userDn.Parent.ToString ());
				}
			}
			else			{
				_Name=lUrl.Host+":"+lUrl.Port;
				_Parent = new DirectoryEntry(conn);
				_Parent.Path = "Ldap:";
			}
		}
All Usage Examples Of Novell.Directory.Ldap.LdapUrl::getDN