DirectoryVirtualListView Class
.NET Framework 2.0
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)
Assembly: System.DirectoryServices (in system.directoryservices.dll)
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 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.Community Additions
ADD
Show: