DirectorySearcher.Asynchronous Propriété

Définition

Obtient ou définit une valeur qui indique si la recherche est réalisée de manière asynchrone.

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

Valeur de propriété

true si la recherche est asynchrone ; sinon, false.

Attributs

Exemples

L’exemple C# suivant montre comment créer une recherche asynchrone.

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();  

Remarques

Une recherche asynchrone peut afficher des résultats tels qu’ils sont trouvés lors de la recherche simultanée de résultats supplémentaires. Cela est utile pour des tâches telles que le remplissage de zones de liste.

Le paramètre par défaut de cette propriété est false.

S’applique à