DirectorySearcher 构造函数
定义
初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class.
重载
| DirectorySearcher() |
使用默认值初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with default values. |
| DirectorySearcher(DirectoryEntry) |
使用指定的搜索根初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class using the specified search root. |
| DirectorySearcher(String) |
使用指定的搜索筛选器初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search filter. |
| DirectorySearcher(DirectoryEntry, String) |
使用指定的搜索根和搜索筛选器初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search root and search filter. |
| DirectorySearcher(String, String[]) |
使用指定的搜索筛选器和要检索的属性初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search filter and properties to retrieve. |
| DirectorySearcher(DirectoryEntry, String, String[]) |
使用指定的搜索根、搜索筛选器和要检索的属性初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, and properties to retrieve. |
| DirectorySearcher(String, String[], SearchScope) |
使用指定的搜索筛选器、要检索的属性和搜索范围初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search filter, properties to retrieve, and search scope. |
| DirectorySearcher(DirectoryEntry, String, String[], SearchScope) |
使用指定的搜索根、搜索筛选器、要检索的属性和搜索范围初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search root, search filter, properties to retrieve, and search scope. |
DirectorySearcher()
使用默认值初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with default values.
public:
DirectorySearcher();
public DirectorySearcher ();
Public Sub New ()
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| SearchRoot | 空引用(在 Visual Basic 中为 Nothing)A null reference (Nothing in Visual Basic) |
| Filter | " (objectClass = * ) ""(objectClass=*)" |
| PropertiesToLoad | 空的 StringCollection 对象An empty StringCollection object |
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(DirectoryEntry)
使用指定的搜索根初始化 DirectorySearcher 类的新实例。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);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry)
参数
- searchRoot
- DirectoryEntry
Active Directory 域服务层次结构中的节点,从该节点处开始搜索。The node in the Active Directory Domain Services hierarchy where the search starts. SearchRoot 属性初始化为该值。The SearchRoot property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| Filter | " (objectClass = * ) ""(objectClass=*)" |
| PropertiesToLoad | 空的 StringCollection 对象An empty StringCollection object |
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(String)
使用指定的搜索筛选器初始化 DirectorySearcher 类的新实例。Initializes a new instance of the DirectorySearcher class with the specified search filter.
public:
DirectorySearcher(System::String ^ filter);
public DirectorySearcher (string filter);
new System.DirectoryServices.DirectorySearcher : string -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String)
参数
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为该值。The Filter property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| SearchRoot | 空引用(在 Visual Basic 中为 Nothing)A null reference (Nothing in Visual Basic) |
| PropertiesToLoad | 空的 StringCollection 对象An empty StringCollection object |
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(DirectoryEntry, String)
使用指定的搜索根和搜索筛选器初始化 DirectorySearcher 类的新实例。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);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String)
参数
- searchRoot
- DirectoryEntry
Active Directory 域服务层次结构中的节点,从该节点处开始搜索。The node in the Active Directory Domain Services hierarchy where the search starts. SearchRoot 属性初始化为该值。The SearchRoot property is initialized to this value.
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为该值。The Filter property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| PropertiesToLoad | 空的 StringCollection 对象。An empty StringCollection object. |
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(String, String[])
使用指定的搜索筛选器和要检索的属性初始化 DirectorySearcher 类的新实例。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);
new System.DirectoryServices.DirectorySearcher : string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String())
参数
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为此值。The Filter property is initialized to this value.
- propertiesToLoad
- String[]
要在搜索过程中检索的属性集。The set of properties to retrieve during the search. PropertiesToLoad 属性初始化为该值。The PropertiesToLoad property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| SearchRoot | 空引用(在 Visual Basic 中为 Nothing)A null reference (Nothing in Visual Basic) |
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(DirectoryEntry, String, String[])
使用指定的搜索根、搜索筛选器和要检索的属性初始化 DirectorySearcher 类的新实例。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);
new System.DirectoryServices.DirectorySearcher : System.DirectoryServices.DirectoryEntry * string * string[] -> System.DirectoryServices.DirectorySearcher
Public Sub New (searchRoot As DirectoryEntry, filter As String, propertiesToLoad As String())
参数
- searchRoot
- DirectoryEntry
Active Directory 域服务层次结构中的节点,从该节点处开始搜索。The node in the Active Directory Domain Services hierarchy where the search starts. SearchRoot 属性初始化为该值。The SearchRoot property is initialized to this value.
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为该值。The Filter property is initialized to this value.
- propertiesToLoad
- String[]
在搜索过程中检索的属性集。The set of properties that are retrieved during the search. PropertiesToLoad 属性初始化为该值。The PropertiesToLoad property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| SearchScope | Subtree |
另请参阅
适用于
DirectorySearcher(String, String[], SearchScope)
使用指定的搜索筛选器、要检索的属性和搜索范围初始化 DirectorySearcher 类的新实例。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);
new System.DirectoryServices.DirectorySearcher : string * string[] * System.DirectoryServices.SearchScope -> System.DirectoryServices.DirectorySearcher
Public Sub New (filter As String, propertiesToLoad As String(), scope As SearchScope)
参数
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为该值。The Filter property is initialized to this value.
- propertiesToLoad
- String[]
要在搜索过程中检索的属性集。The set of properties to retrieve during the search. PropertiesToLoad 属性初始化为该值。The PropertiesToLoad property is initialized to this value.
- scope
- SearchScope
由服务器遵循的搜索范围。The scope of the search that is observed by the server. SearchScope 属性初始化为该值。The SearchScope property is initialized to this value.
注解
下表显示了对象的初始属性值 DirectorySearcher 。The following table shows the initial property values of the DirectorySearcher object.
| propertiesProperty | 初始值Initial value |
|---|---|
| SearchRoot | 空引用(在 Visual Basic 中为 Nothing)A null reference (Nothing in Visual Basic) |
另请参阅
适用于
DirectorySearcher(DirectoryEntry, String, String[], SearchScope)
使用指定的搜索根、搜索筛选器、要检索的属性和搜索范围初始化 DirectorySearcher 类的新实例。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);
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)
参数
- searchRoot
- DirectoryEntry
Active Directory 域服务层次结构中的节点,从该节点处开始搜索。The node in the Active Directory Domain Services hierarchy where the search starts. SearchRoot 属性初始化为该值。The SearchRoot property is initialized to this value.
- filter
- String
轻量目录访问协议 (LDAP) 格式的搜索筛选器字符串。The search filter string in Lightweight Directory Access Protocol (LDAP) format. Filter 属性初始化为该值。The Filter property is initialized to this value.
- propertiesToLoad
- String[]
要在搜索过程中检索的属性集。The set of properties to retrieve during the search. PropertiesToLoad 属性初始化为该值。The PropertiesToLoad property is initialized to this value.
- scope
- SearchScope
由服务器遵循的搜索范围。The scope of the search that is observed by the server. SearchScope 属性初始化为该值。The SearchScope property is initialized to this value.