Skip to content

AdsPath

The AdsPath class contains methods to manipulate ADS paths.

Inheritance: The AdsPath class implements the IComparable<AdsPath> interface.

Namespace: Softerra.Adaxes.Adsi

Constructors

  • Constructor

  • Description

  • AdsPath(String)

  • Constructs a new instance of the AdsPath class based on the specified string representation of an ADS path.

  • AdsPath(AdsPath)

  • Constructs a new instance of the AdsPath class by copying data from another instance of the AdsPath class.

  • AdsPath(String, String)

  • Constructs a new instance of the AdsPath class based on the given path components.

  • AdsPath(String, String, String)

  • Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

  • AdsPath(String, String, Guid)

  • Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

  • AdsPath(String, String, Sid)

  • Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

  • AdsPath(String, String, WellKnownGuid)

  • Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

  • AdsPath(Guid)

  • Constructs a new instance of the AdsPath class from the specified GUID.

Constants

Methods

  • Method

  • Description

  • CreateChildPath()

  • Creates an ADS path for a child of the object that this ADS path represents.

  • TryParse()

  • Creates an instance of the AdsPath class by parsing the specified string.

  • CompareTo()

  • Compares the ADS path with another ADS path.

Properties

  • Property

  • Description

  • Namespace

  • Gets the ADS Path string namespace part (e.g. LDAP or Adaxes).

  • Server

  • Gets the host part of the ADS path (e.g. mydomain.com or mydomain.com:3268).

  • PathType

  • Gets the ADS path type.

  • Path

  • Gets an optional part of the ADS path that distinguishes a particular directory object and follows just after the namespace://host:port/ component of the ADS path.

  • Guid

  • Gets the GUID component of the ADS path.

  • Sid

  • Gets the SID component of the ADS path.

  • DN

  • Gets the DN component of the ADS path.

  • WellKnownGuid

  • Gets the Well-Known GUID component of the ADS path.

  • SchemaObject

  • Gets the name of the schema object that this ADS path represents.

Details

AdsPath(String)

Constructs a new instance of the AdsPath class based on the specified string representation of an ADS path.

AdsPath(String adsPath)

Exceptions

  • ArgumentNullException
  • The adsPath parameter is NULL.

  • FormatException

  • The value passed by the adsPath parameter is not a valid ADS path.

AdsPath(AdsPath)

Constructs a new instance of the AdsPath class by copying data from another instance of the AdsPath class.

AdsPath(AdsPath otherAdsPath)

AdsPath(String, String)

Constructs a new instance of the AdsPath class based on the given path components. An ADS path within the Adaxes namespace will be created.

AdsPath(String host, String path)

Parameters

  • host - An optional parameter that contains either the DNS host name (e.g. mycompany.com) or IP address (e.g. 192.168.120.123) of a host.
  • path - An optional parameter that contains a directory path.

AdsPath(String, String, String)

Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

AdsPath(String namespace, 
        String host, 
        String path)

Parameters

  • namespace - Specifies the namespace of the ADS path to be constructed. The allowed values are LDAP and Adaxes.
  • host - An optional parameter that contains either the DNS host name (e.g. mycompany.com) or IP address (e.g. 192.168.120.123) of a host.
  • path - An optional parameter that contains a directory path.

AdsPath(String, String, Guid)

Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

AdsPath(String namespace, 
        String host, 
        Guid guid)

Parameters

  • namespace - Specifies the namespace of the ADS path to be constructed. The allowed values are LDAP and Adaxes.
  • host - An optional parameter that contains either the DNS host name (e.g. mycompany.com) or IP address (e.g. 192.168.120.123) of a host.
  • guid - Specifies the GUID of the directory object that the new path will represent.

AdsPath(String, String, Sid)

Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

AdsPath(String namespace, 
        String host, 
        Sid sid)

Parameters

  • namespace - Specifies the namespace of the ADS path to be constructed. The allowed values are LDAP and Adaxes.
  • host - An optional parameter that contains either the DNS host name (e.g. mycompany.com) or IP address (e.g. 192.168.120.123) of a host.
  • sid - Specifies the security identifier (SID) of the directory object that the new path will represent.

AdsPath(String, String, WellKnownGuid)

Constructs a new instance of the AdsPath class based on the given path components and allows you to specify the ADS path namespace.

AdsPath(String namespace, 
        String host, 
        WellKnownGuid wkGuid)

Parameters

  • namespace - Specifies the namespace of the ADS path to be constructed. The allowed values are LDAP and Adaxes.
  • host - An optional parameter that contains either the DNS host name (e.g. mycompany.com) or IP address (e.g. 192.168.120.123) of a host.
  • wkGuid - Specifies the Well-Known GUID of the directory object that this path represents.

AdsPath(Guid)

Constructs a new instance of the AdsPath class from the specified GUID.

AdsPath(Guid guid)

RootDsePrefix

Defines the RootDSE ADS path prefix.

RootDsePrefix = "RootDSE"
  • Type:
  • String
  • Access:
  • Read-only

AdaxesNamespaceName

Defines the Adaxes ADS path namespace name.

AdaxesNamespaceName = "Adaxes"
  • Type:
  • String
  • Access:
  • Read-only

LdapNamespaceName

Defines the LDAP ADS path namespace name.

LdapNamespaceName = "LDAP"
  • Type:
  • String
  • Access:
  • Read-only

CreateChildPath()

Creates an ADS path for a child of the object that this ADS path represents.

AdsPath CreateChildPath(String childRdn)

TryParse()

Creates an instance of the AdsPath class by parsing the specified string. The return value of the method indicates whether the conversion succeeded.

static Boolean TryParse(String adsPath, out AdsPath pathClass)

Parameters

  • adsPath - Contains the ADS path string to parse.
  • pathClass - An output (OUT) parameter that returns an instance of the AdsPath class when conversion succeeds, and NULL, when it doesn’t.

CompareTo()

Compares the ADS path with another ADS path.

copyInt32 CompareTo(AdsPath otherAdsPath)

Return value

The method returns an Int32 that indicates the relative order of the objects being compared. The return value has the following meanings:

  • If the return value is less than zero, this ADS path is less than the ADS path specified in the otherAdsPath parameter.
  • If the return value is 0, this ADS path is equal to the ADS path specified in the otherAdsPath parameter.
  • If the return value is greater than zero, this ADS path is greater than the ADS path specified in the otherAdsPath parameter.

Namespace

Gets the ADS Path string namespace part (e.g. LDAP or Adaxes).

  • Type:
  • String
  • Access:
  • Read-only

Server

Gets the host part of the ADS path (e.g. mydomain.com or mydomain.com:3268). If the property is NULL, the default host will be assumed.

  • Type:
  • String
  • Access:
  • Read-only

PathType

Gets the ADS path type. The type of the ADS path is determined during value parsing and cannot be changed directly.


Path

Gets an optional part of the ADS path that distinguishes a particular directory object and follows just after the namespace://host:port/ component of the ADS path.

  • Type:
  • String
  • Access:
  • Read-only

Guid

Gets the GUID component of the ADS path. If the ADS path type is neither Guid, nor WellKnownGuid, the property throws the InvalidOperationException exception.

  • Type:
  • Guid
  • Access:
  • Read-only

Sid

Gets the SID component of the ADS path. If the ADS path type is not Sid, the property throws the InvalidOperationException exception.

  • Type:
  • Sid
  • Access:
  • Read-only

DN

Gets the DN component of the ADS path. If the ADS path type is neither DN, nor RootDse, the property throws the InvalidOperationException exception.

  • Type:
  • String
  • Access:
  • Read-only

WellKnownGuid

Gets the Well-Known GUID component of the ADS path. If the ADS path type is not WellKnownGuid, the property throws the InvalidOperationException exception.

  • Type:
  • WellKnownGuid
  • Access:
  • Read-only

SchemaObject

Gets the name of the schema object that this ADS path represents. The property gets a string that contains the name of an object class as defined in the Active Directory schema (e.g. user, group, organizationalUnit).

  • Type:
  • String
  • Access:
  • Read-only

Requirements

Minimum required version: 2009.1

See also