Export (0) Print
Expand All
0 out of 3 rated this helpful - Rate this topic

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)

public class DirectoryVirtualListView
public class DirectoryVirtualListView
public class DirectoryVirtualListView
Not applicable.

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(…");
}


System.Object
  System.DirectoryServices.DirectoryVirtualListView
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

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.

.NET Framework

Supported in: 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.