| LDAPSearch Method |
Searches the LDAP directory for entries that match the specified search filter.
Namespace:
Galactic.LDAP
Assembly:
Galactic.LDAP (in Galactic.LDAP.dll) Version: 1.3.0.499 (1.3.0.499)
Syntax public List<SearchResultEntry> Search(
string filter,
List<string> attributes = null,
string baseDn = null,
SearchScope scope = SearchScope.Subtree,
int queryPageSize = 500,
bool chaseReferrals = true
)
Public Function Search (
filter As String,
Optional attributes As List(Of String) = Nothing,
Optional baseDn As String = Nothing,
Optional scope As SearchScope = SearchScope.Subtree,
Optional queryPageSize As Integer = 500,
Optional chaseReferrals As Boolean = true
) As List(Of SearchResultEntry)
public:
List<SearchResultEntry^>^ Search(
String^ filter,
List<String^>^ attributes = nullptr,
String^ baseDn = nullptr,
SearchScope scope = SearchScope::Subtree,
int queryPageSize = 500,
bool chaseReferrals = true
)
member Search :
filter : string *
?attributes : List<string> *
?baseDn : string *
?scope : SearchScope *
?queryPageSize : int *
?chaseReferrals : bool
(* Defaults:
let _attributes = defaultArg attributes null
let _baseDn = defaultArg baseDn null
let _scope = defaultArg scope SearchScope.Subtree
let _queryPageSize = defaultArg queryPageSize 500
let _chaseReferrals = defaultArg chaseReferrals true
*)
-> List<SearchResultEntry>
Parameters
- filter
- Type: SystemString
The filter that defines the entries to find. - attributes (Optional)
- Type: System.Collections.GenericListString
(Optional) The attributes that should be returned in each entry found. - baseDn (Optional)
- Type: SystemString
(Optional)The distinguished name of the base entry where the search will begin. (Typically an OU or the base DN of the directory.) If not supplied, the default values will be used. This base is used only for the duration of this search. - scope (Optional)
- Type: System.DirectoryServices.ProtocolsSearchScope
(Optional) The scope to use while searching. Defaults to Subtree. (Typically Base, just the object with the DN specified; OneLevel, just the child objects of the base object; or Subtree, the base object and all child objects) This scope is used only for the duration of this search. - queryPageSize (Optional)
- Type: SystemInt32
(Optional) The query page size to specify when making large requests. Defaults to DEFAULT_QUERY_PAGE_SIZE. - chaseReferrals (Optional)
- Type: SystemBoolean
(Optional) Whether the search should chase object referrals to other servers if necessary. Defaults to true;
Return Value
Type:
ListSearchResultEntryA collection of search result entries found, or null if there was an error with the search.
See Also