DirectorySearcher.Asynchronous Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient ou définit une valeur qui indique si la recherche est effectuée de façon 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 ; false Sinon.
- 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 les résultats à mesure qu’ils sont trouvés tout en recherchant simultanément des résultats supplémentaires. Cela est utile pour les tâches telles que le remplissage des zones de liste.
Le paramètre par défaut de cette propriété est false.