DirectorySearcher.Asynchronous Propiedad

Definición

Obtiene o establece un valor que indica si la búsqueda se realiza de forma asincrónica.

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

Valor de propiedad

Es true si la búsqueda es asincrónica; de lo contrario, es false.

Atributos

Ejemplos

En el ejemplo de C# siguiente se muestra cómo crear una búsqueda asincrónica.

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

Comentarios

Una búsqueda asincrónica puede mostrar los resultados a medida que se encuentran al buscar resultados adicionales simultáneamente. Esto es útil para tareas como rellenar cuadros de lista.

El valor predeterminado de esta propiedad es false.

Se aplica a