Editar

Compartir a través de


DirectorySearcher Constructors

Definition

Initializes a new instance of the DirectorySearcher class.

Overloads

DirectorySearcher()

Initializes a new instance of the DirectorySearcher class with default values.

DirectorySearcher(DirectoryEntry)

Initializes a new instance of the DirectorySearcher class using the specified search root.

DirectorySearcher(String)

Initializes a new instance of the DirectorySearcher class with the specified search filter.

DirectorySearcher(DirectoryEntry, String)

Initializes a new instance of the DirectorySearcher class with the specified search root and search filter.

DirectorySearcher(String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search filter and properties to retrieve.

DirectorySearcher(DirectoryEntry, String, String[])

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, and properties to retrieve.

DirectorySearcher(String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search filter, properties to retrieve, and search scope.

DirectorySearcher(DirectoryEntry, String, String[], SearchScope)

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, properties to retrieve, and search scope.

DirectorySearcher()

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with default values.

public:
 DirectorySearcher();
public DirectorySearcher ();
Public Sub New ()

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
Filter "(objectClass=*)"
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

See also

Applies to

DirectorySearcher(DirectoryEntry)

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class using the specified search root.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry? searchRoot);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry)

Parameters

searchRoot
DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
Filter "(objectClass=*)"
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

See also

Applies to

DirectorySearcher(String)

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search filter.

public:
 DirectorySearcher(System::String ^ filter);
public DirectorySearcher (string? filter);
public DirectorySearcher (string filter);
new System.DirectoryServices.DirectorySearcher : string -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String)

Parameters

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
PropertiesToLoad An empty StringCollection object
SearchScope Subtree

See also

Applies to

DirectorySearcher(DirectoryEntry, String)

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search root and search filter.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry? searchRoot, string? filter);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String)

Parameters

searchRoot
DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
PropertiesToLoad An empty StringCollection object.
SearchScope Subtree

See also

Applies to

DirectorySearcher(String, String[])

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search filter and properties to retrieve.

public:
 DirectorySearcher(System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad);
public DirectorySearcher (string? filter, string[]? propertiesToLoad);
public DirectorySearcher (string filter, string[] propertiesToLoad);
new System.DirectoryServices.DirectorySearcher : string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String())

Parameters

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)
SearchScope Subtree

See also

Applies to

DirectorySearcher(DirectoryEntry, String, String[])

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, and properties to retrieve.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry? searchRoot, string? filter, string[]? propertiesToLoad);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter, string[] propertiesToLoad);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String, propertiesToLoad As String())

Parameters

searchRoot
DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties that are retrieved during the search. The PropertiesToLoad property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchScope Subtree

See also

Applies to

DirectorySearcher(String, String[], SearchScope)

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search filter, properties to retrieve, and search scope.

public:
 DirectorySearcher(System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad, System::DirectoryServices::SearchScope scope);
public DirectorySearcher (string? filter, string[]? propertiesToLoad, System.DirectoryServices.SearchScope scope);
public DirectorySearcher (string filter, string[] propertiesToLoad, System.DirectoryServices.SearchScope scope);
new System.DirectoryServices.DirectorySearcher : string * string[] * System.DirectoryServices.SearchScope -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String(), scope As SearchScope)

Parameters

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

scope
SearchScope

The scope of the search that is observed by the server. The SearchScope property is initialized to this value.

Remarks

The following table shows the initial property values of the DirectorySearcher object.

Property Initial value
SearchRoot A null reference (Nothing in Visual Basic)

See also

Applies to

DirectorySearcher(DirectoryEntry, String, String[], SearchScope)

Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs
Source:
DirectorySearcher.cs

Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, properties to retrieve, and search scope.

public:
 DirectorySearcher(System::DirectoryServices::DirectoryEntry ^ searchRoot, System::String ^ filter, cli::array <System::String ^> ^ propertiesToLoad, System::DirectoryServices::SearchScope scope);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry? searchRoot, string? filter, string[]? propertiesToLoad, System.DirectoryServices.SearchScope scope);
public DirectorySearcher (System.DirectoryServices.DirectoryEntry searchRoot, string filter, string[] propertiesToLoad, System.DirectoryServices.SearchScope scope);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string * string[] * System.DirectoryServices.SearchScope -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String, propertiesToLoad As String(), scope As SearchScope)

Parameters

searchRoot
DirectoryEntry

The node in the Active Directory Domain Services hierarchy where the search starts. The SearchRoot property is initialized to this value.

filter
String

The search filter string in Lightweight Directory Access Protocol (LDAP) format. The Filter property is initialized to this value.

propertiesToLoad
String[]

The set of properties to retrieve during the search. The PropertiesToLoad property is initialized to this value.

scope
SearchScope

The scope of the search that is observed by the server. The SearchScope property is initialized to this value.

See also

Applies to