編輯

共用方式為


DirectoryVirtualListView Class

Definition

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.

public ref class DirectoryVirtualListView
public class DirectoryVirtualListView
type DirectoryVirtualListView = class
Public Class DirectoryVirtualListView
Inheritance
DirectoryVirtualListView

Examples

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

Constructors

DirectoryVirtualListView()

Initializes a new instance of the DirectoryVirtualListView class.

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, Int32)

Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and offset set.

DirectoryVirtualListView(Int32, Int32, String, DirectoryVirtualListViewContext)

Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, target and context set.

DirectoryVirtualListView(Int32, Int32, String)

Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and target set.

DirectoryVirtualListView(Int32)

Initializes a new instance of the DirectoryVirtualListView class with the after count set.

Properties

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.

Methods

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

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

Applies to

See also