API Reference
Class
LdapSearchHelper
Helper methods for executing LDAP searches using the canonical ADPlayground LDAP engine.
Inheritance
- Object
- LdapSearchHelper
Methods
public static IEnumerable<SearchResult> Search(String domainController, String baseDn, String filter, IEnumerable<String> propertiesToLoad, SearchScope scope, Int32 pageSize, Int32 sizeLimit, CancellationToken cancellationToken = null) #Returns:
IEnumerable<SearchResult>Executes an LDAP search on a specific domain controller (when provided) or performs a domain-aware search when no domain controller is specified.
Parameters
- domainController System.String
- Optional domain controller to target.
- baseDn System.String
- Base distinguished name to search under.
- filter System.String
- LDAP filter string.
- propertiesToLoad System.Collections.Generic.IEnumerable{System.String}
- Attributes to load.
- scope System.DirectoryServices.SearchScope
- Search scope.
- pageSize System.Int32
- LDAP page size.
- sizeLimit System.Int32
- LDAP size limit (0 = unlimited).
- cancellationToken System.Threading.CancellationToken = null
- Cancellation token.
public static IEnumerable<SearchResult> SearchWithTimeout(String domainController, String baseDn, String filter, IEnumerable<String> propertiesToLoad, SearchScope scope, Int32 pageSize, Int32 sizeLimit, TimeSpan timeout, CancellationToken cancellationToken = null) #Returns:
IEnumerable<SearchResult>Executes an LDAP search using a temporary engine instance configured with a bounded timeout.
Parameters
- domainController System.String
- baseDn System.String
- filter System.String
- propertiesToLoad System.Collections.Generic.IEnumerable{System.String}
- scope System.DirectoryServices.SearchScope
- pageSize System.Int32
- sizeLimit System.Int32
- timeout System.TimeSpan
- cancellationToken System.Threading.CancellationToken = null