DirectorySearcher.Asynchronous プロパティ

定義

検索が非同期に実行されるかどうかを示す値を取得または設定します。

public:
 property bool Asynchronous { bool get(); void set(bool value); };
[System.DirectoryServices.DSDescription("DSAsynchronous")]
[System.Runtime.InteropServices.ComVisible(false)]
public bool Asynchronous { get; set; }
[<System.DirectoryServices.DSDescription("DSAsynchronous")>]
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.Asynchronous : bool with get, set
Public Property Asynchronous As Boolean

プロパティ値

true 検索が非同期の場合。それ以外の場合 false

属性

次の C# の例は、非同期検索を作成する方法を示しています。

using System.DirectoryServices;
...
// Bind to the users container.
DirectoryEntry entry = new DirectoryEntry("LDAP://CN=users,DC=fabrikam,DC=com");
// Create a DirectorySearcher object.
DirectorySearcher src = new DirectorySearcher(entry);
//Set the Asynchronous property to true.
src.Asynchronous = true;
//Use the FindAll method to get search results.
SearchResultCollection res = src.FindAll();

注釈

非同期検索では、追加の結果を同時に検索しながら、見つかった結果を表示できます。 これは、リスト ボックスの設定などのタスクに役立ちます。

このプロパティの既定の設定は falseです。

適用対象