DirectorySearcher 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 DirectorySearcher 類別的新執行個體。
多載
| 名稱 | Description |
|---|---|
| DirectorySearcher() |
初始化一個以預設值的新類別實例 DirectorySearcher 。 |
| DirectorySearcher(DirectoryEntry) |
使用指定的搜尋根目錄,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(String) |
使用指定的搜尋篩選,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(DirectoryEntry, String) |
使用指定的搜尋根和搜尋篩選,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(String, String[]) |
使用要擷取的指定搜尋篩選和屬性,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(DirectoryEntry, String, String[]) |
使用要擷取的指定搜尋根目錄、搜尋篩選和屬性,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(String, String[], SearchScope) |
使用指定的搜尋篩選、要擷取的屬性和搜尋範圍,初始化 DirectorySearcher 類別的新實例。 |
| DirectorySearcher(DirectoryEntry, String, String[], SearchScope) |
使用指定的搜尋根目錄、搜尋篩選、要擷取的屬性,以及搜尋範圍,初始化 DirectorySearcher 類別的新實例。 |
DirectorySearcher()
初始化一個以預設值的新類別實例 DirectorySearcher 。
public:
DirectorySearcher();
public DirectorySearcher();
Public Sub New ()
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| SearchRoot | null 參考 (在 Visual Basic 中為 Nothing) |
| Filter | “(objectClass=*)” |
| PropertiesToLoad | 空白 StringCollection 物件 |
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(DirectoryEntry)
使用指定的搜尋根目錄,初始化 DirectorySearcher 類別的新實例。
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)
參數
- searchRoot
- DirectoryEntry
Active Directory 網域服務 階層中搜尋起點的節點。 SearchRoot該屬性初始化為此值。
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| Filter | “(objectClass=*)” |
| PropertiesToLoad | 空白 StringCollection 物件 |
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(String)
使用指定的搜尋篩選,初始化 DirectorySearcher 類別的新實例。
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)
參數
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| SearchRoot | null 參考 (在 Visual Basic 中為 Nothing) |
| PropertiesToLoad | 空白 StringCollection 物件 |
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(DirectoryEntry, String)
使用指定的搜尋根和搜尋篩選,初始化 DirectorySearcher 類別的新實例。
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)
參數
- searchRoot
- DirectoryEntry
Active Directory 網域服務 階層中搜尋起點的節點。 SearchRoot該屬性初始化為此值。
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| PropertiesToLoad | 一個空物 StringCollection 。 |
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(String, String[])
使用要擷取的指定搜尋篩選和屬性,初始化 DirectorySearcher 類別的新實例。
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())
參數
- propertiesToLoad
- String[]
搜尋過程中要取得的屬性集合。 PropertiesToLoad該屬性初始化為此值。
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| SearchRoot | null 參考 (在 Visual Basic 中為 Nothing) |
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(DirectoryEntry, String, String[])
使用要擷取的指定搜尋根目錄、搜尋篩選和屬性,初始化 DirectorySearcher 類別的新實例。
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())
參數
- searchRoot
- DirectoryEntry
Active Directory 網域服務 階層中搜尋起點的節點。 SearchRoot該屬性初始化為此值。
- propertiesToLoad
- String[]
搜尋過程中被檢索的屬性集合。 PropertiesToLoad該屬性初始化為此值。
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| SearchScope | Subtree |
另請參閱
適用於
DirectorySearcher(String, String[], SearchScope)
使用指定的搜尋篩選、要擷取的屬性和搜尋範圍,初始化 DirectorySearcher 類別的新實例。
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)
參數
- propertiesToLoad
- String[]
搜尋過程中要取得的屬性集合。 PropertiesToLoad該屬性初始化為此值。
- scope
- SearchScope
伺服器所觀察的搜尋範圍。 SearchScope該屬性初始化為此值。
備註
下表顯示物件 DirectorySearcher 的初始屬性值。
| 房產 | 初始值 |
|---|---|
| SearchRoot | null 參考 (在 Visual Basic 中為 Nothing) |
另請參閱
適用於
DirectorySearcher(DirectoryEntry, String, String[], SearchScope)
使用指定的搜尋根目錄、搜尋篩選、要擷取的屬性,以及搜尋範圍,初始化 DirectorySearcher 類別的新實例。
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)
參數
- searchRoot
- DirectoryEntry
Active Directory 網域服務 階層中搜尋起點的節點。 SearchRoot該屬性初始化為此值。
- propertiesToLoad
- String[]
搜尋過程中要取得的屬性集合。 PropertiesToLoad該屬性初始化為此值。
- scope
- SearchScope
伺服器所觀察的搜尋範圍。 SearchScope該屬性初始化為此值。