DirectoryVirtualListView Class
The DirectoryVirtualListView class specifies how to conduct a virtual list view search. A virtual list view search enables users to view search results as address-book style virtual list views. It is specifically designed for very large result sets. Search data is retrieved in contiguous subsets of a sorted directory search.
Namespace: System.DirectoryServices
Assembly: System.DirectoryServices (in System.DirectoryServices.dll)
The DirectoryVirtualListView type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | DirectoryVirtualListView() | Initializes a new instance of the DirectoryVirtualListView class. |
![]() | DirectoryVirtualListView(Int32) | Initializes a new instance of the DirectoryVirtualListView class with the after count set. |
![]() | DirectoryVirtualListView(Int32, Int32, Int32) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and offset set. |
![]() | DirectoryVirtualListView(Int32, Int32, String) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and target set. |
![]() | DirectoryVirtualListView(Int32, Int32, Int32, DirectoryVirtualListViewContext) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, offset and context set. |
![]() | DirectoryVirtualListView(Int32, Int32, String, DirectoryVirtualListViewContext) | Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, target and context set. |
| Name | Description | |
|---|---|---|
![]() | AfterCount | Gets or sets a value to indicate the number of entries after the target entry that the client is requesting from the server. |
![]() | ApproximateTotal | Gets or sets a value to indicate the estimated total count of items in the list. |
![]() | BeforeCount | Gets or sets a value to indicate the number of entries before the target entry that the client is requesting from the server. |
![]() | DirectoryVirtualListViewContext | Gets or sets a value to indicate the virtual list view search response. |
![]() | Offset | Gets or sets a value to indicate the target entry's offset within the list. |
![]() | Target | The Target property gets or sets a value to indicate the target entry that was requested by the client. |
![]() | TargetPercentage | The TargetPercentage property gets or sets a value to indicate the estimated target entry's requested offset within the list, as a percentage of the total number of items in the list. |
| Name | Description | |
|---|---|---|
![]() | Equals(Object) | Determines whether the specified object is equal to the current object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
The following C# example shows how to retrieve the first 30 entries in a result set.
using System.DirectoryServices; ... DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(0,30); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
The following C# example shows how to retrieve the first 50 entries in a result set that start with the letters "Ha".
using System.DirectoryServices; ... DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(0,50, "Ha"); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
The following C# example shows how to retrieve the first 100 entries at the 60% approximate target.
using System.DirectoryServices; ... // First VLV calls. DirectorySearcher src = new DirectorySearcher("…"); src.VirtualListView = new DirectoryVirtualListView(100); foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); } // Second Call, the VLV context is still attached to the DirectorySearcher. src.VirtualListView.TargetPercentage = 60; src.VirtualListView.BeforeCount = 50; src.VirtualListView.AfterCount = 50; foreach(SearchResult res in src.FindAll() ) { Console.WriteLine(…"); }
Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.


