IAdmDirectorySearcher

The IAdmDirectorySearcher interface provides methods and properties that are used to perform directory searches.

Methods

Properties

  • Property

  • Description

  • Asynchronous

  • Gets or sets a value that indicates whether the search is performed asynchronously.

  • AttributeScopeQuery

  • Gets or sets the LDAP name of the DN-syntax property to search in.

  • CacheResults

  • Gets or sets a value indicating whether search results are cached on the client computer.

  • ClientTimeout

  • Gets or sets the maximum amount of time that the client waits for the server to return results.

  • Criteria

  • Gets or sets the search criteria.

  • DerefAlias

  • Gets or sets a value indicating how to handle aliases of directory objects found during search.

  • DirectorySynchronization

  • Gets or sets an object that represents a directory synchronization control to be used during the search.

  • ExtendedDN

  • Gets or sets the format of distinguished names.

  • PageSize

  • Gets or sets the page size in a paged search.

  • PagingInfo

  • Gets or sets a value that contains information about a paged search.

  • PropertyNamesOnly

  • Gets or sets a value that indicates whether the directory search retrieves only the names of the properties which have values.

  • ReferralChasing

  • Gets or sets a value indicating how referrals are chased during the search.

  • SearchScope

  • Gets or sets the scope of the directory search.

  • SecurityMasks

  • Gets or sets a value indicating which security access information for the specified properties should be returned by the search.

  • ServerTimeLimit

  • Gets or sets the maximum amount of time the server spends searching.

  • SizeLimit

  • Gets or sets the maximum number of objects that the server returns in the search.

  • Sort

  • Gets or sets a value indicating how to sort the search results.

  • Tombstone

  • Gets or sets a value indicating whether the search should also return deleted objects if they match the search filter.

  • VirtualListView

  • Gets or sets the virtual list view options for the search.

  • VirtualRoot

  • Gets or sets a value indicating whether the virtual root is used for the search.

Details

GetPropertiesToLoad()

Gets a list of properties to fetch during the directory search.

string[] GetPropertiesToLoad()

SetPropertiesToLoad()

Sets a list of properties to fetch during the directory search.

void SetPropertiesToLoad(string[] properties)

Parameters

  • properties – an array of property names whose values to fetch.

ResetSearchParameters()

Resets search parameters to the default values.

void ResetSearchParameters()

ExecuteSearch()

Executes the directory search and returns the IAdmSearchResultIterator interface that can further be used to iterate through search results.

IAdmSearchResultIterator ExecuteSearch()

Examples


Asynchronous

Gets or sets a value that indicates whether the search is performed asynchronously.

  • Type:
  • bool
  • Access:
  • Read/Write

AttributeScopeQuery

Gets or sets the name of the DN property to search in.

  • Type:
  • string
  • Access:
  • Read/Write

Remarks

DN properties are properties containing distinguished names of directory objects. For example, if you want to search among members of a group, you should specify member as a value of the property.

Only one property can be used for this type of search. To execute such a search, set the SearchScope property to ADS_SCOPE_BASE.


CacheResults

Gets or sets a value indicating whether search results are cached on the client computer.

  • Type:
  • string
  • Access:
  • Read/Write

ClientTimeout

Gets or sets the maximum amount of time that the client waits for the server to return results. If the server does not respond within the time specified, the search is aborted, and no results are returned.

  • Type:
  • TimeSpan
  • Access:
  • Read/Write

Criteria

Gets or sets the search criteria. For details about building search criteria, see How to build criteria.


DerefAlias

Gets or sets a value indicating how to handle aliases of directory objects found during search.


DirectorySynchronization

Gets or sets an object that represents a directory synchronization control to be used during the search.

Remarks

The DirSync control enables you to search a directory partition for objects that have changed since a previous state. The state is identified by a search cookie returned by the server after each search. To get the cookie, use the AdmDirectorySynchronization::GetCookie method. On subsequent searches, pass the cookie to the constructor of the AdmDirectorySynchronization class.

The base object of such a search must be the root of a directory partition, which can be a domain partition, the configuration partition, or the schema partition. The scope of a DirSync search must be ADS_SCOPE_SUBTREE, that is, the entire subtree of the partition.


ExtendedDN

Gets or sets the format of distinguished names.


PageSize

Gets or sets the page size in a paged search.

  • Type:
  • int
  • Access:
  • Read/Write

PagingInfo

Gets or sets a value that contains information about a paged search.


PropertyNamesOnly

Gets or sets a value that indicates whether the directory search retrieves only the names of the properties which have values.

  • Type:
  • bool
  • Access:
  • Read/Write

ReferralChasing

Gets or sets a value indicating how referrals are chased during the search.


SearchScope

Gets or sets the scope of the directory search.


SecurityMasks

Gets or sets a value indicating which security access information for the specified properties should be returned by the search.


ServerTimeLimit

Gets or sets the maximum amount of time the server spends searching. If the time limit is reached, only entries that are found up to that point are returned.

  • Type:
  • TimeSpan
  • Access:
  • Read/Write

SizeLimit

Gets or sets the maximum number of objects that the server returns in the search.

  • Type:
  • int
  • Access:
  • Read/Write

Sort

Gets or sets a value indicating how to sort the search results.


Tombstone

Gets or sets a value indicating whether the search should also return deleted objects if they match the search filter.

  • Type:
  • bool
  • Access:
  • Read/Write

VirtualListView

Gets or sets the virtual list view options for the search.


VirtualRoot

Gets or sets a value indicating whether the search is performed in all the domains managed by Adaxes.

  • Type:
  • bool
  • Access:
  • Read/Write

Remarks

If VirtualRoot is set to true, SearchScope must be set to ADS_SCOPE_SUBTREE.


Requirements

Minimum required version: 2023

See also