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 bool 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.

int CompareTo(AdsPath otherAdsPath)

Return value

The method returns an int 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 your directory schema (e.g. user, group, organizationalUnit).

  • Type:
  • string
  • Access:
  • Read-only

Requirements

Minimum required version: 2009.1

See also