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.

System.Object
  System.DirectoryServices.DirectoryVirtualListView

Namespace:  System.DirectoryServices
Assembly:  System.DirectoryServices (in System.DirectoryServices.dll)

public class DirectoryVirtualListView

The DirectoryVirtualListView type exposes the following members.

  NameDescription
Public methodDirectoryVirtualListView()Initializes a new instance of the DirectoryVirtualListView class.
Public methodDirectoryVirtualListView(Int32)Initializes a new instance of the DirectoryVirtualListView class with the after count set.
Public methodDirectoryVirtualListView(Int32, Int32, Int32)Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and offset set.
Public methodDirectoryVirtualListView(Int32, Int32, String)Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and target set.
Public methodDirectoryVirtualListView(Int32, Int32, Int32, DirectoryVirtualListViewContext)Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, offset and context set.
Public methodDirectoryVirtualListView(Int32, Int32, String, DirectoryVirtualListViewContext)Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, target and context set.
Top

  NameDescription
Public propertyAfterCountGets or sets a value to indicate the number of entries after the target entry that the client is requesting from the server.
Public propertyApproximateTotalGets or sets a value to indicate the estimated total count of items in the list.
Public propertyBeforeCountGets or sets a value to indicate the number of entries before the target entry that the client is requesting from the server.
Public propertyDirectoryVirtualListViewContextGets or sets a value to indicate the virtual list view search response.
Public propertyOffsetGets or sets a value to indicate the target entry's offset within the list.
Public propertyTargetThe Target property gets or sets a value to indicate the target entry that was requested by the client.
Public propertyTargetPercentageThe 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.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

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

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, 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.

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft