DirectorySearcher.Asynchronous Eigenschap

Definitie

Hiermee wordt een waarde opgehaald of ingesteld die aangeeft of de zoekopdracht asynchroon wordt uitgevoerd.

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

Waarde van eigenschap

true als de zoekopdracht asynchroon is; false Anders.

Kenmerken

Voorbeelden

In het volgende C#-voorbeeld ziet u hoe u een asynchrone zoekopdracht maakt.

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

Opmerkingen

Een asynchrone zoekopdracht kan resultaten weergeven terwijl ze tegelijkertijd naar aanvullende resultaten worden gezocht. Dit is handig voor taken zoals het invullen van keuzelijsten.

De standaardinstelling voor deze eigenschap is false.

Van toepassing op