DirectoryVirtualListView 类
定义
DirectoryVirtualListView 类指定如何进行虚拟列表视图搜索。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
- 继承
-
DirectoryVirtualListView
示例
下面的 c # 示例演示如何检索结果集中的前30个条目。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(…");
}
下面的 c # 示例演示如何检索结果集中以字母 "Ha" 开头的前50个条目。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(…");
}
下面的 c # 示例演示了如何检索60% 近似值目标位置的前100个条目。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(…");
}
构造函数
| DirectoryVirtualListView() |
初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class. |
| DirectoryVirtualListView(Int32) |
使用计数后集初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class with the after count set. |
| DirectoryVirtualListView(Int32, Int32, Int32) |
使用计数前、计数后和偏移量集初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and offset set. |
| DirectoryVirtualListView(Int32, Int32, Int32, DirectoryVirtualListViewContext) |
使用计数前、计数后、偏移量和上下文集来初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, offset and context set. |
| DirectoryVirtualListView(Int32, Int32, String) |
使用计数前、计数后和目标集初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, and target set. |
| DirectoryVirtualListView(Int32, Int32, String, DirectoryVirtualListViewContext) |
使用计数前、计数后、目标和上下文集初始化 DirectoryVirtualListView 类的新实例。Initializes a new instance of the DirectoryVirtualListView class with the before count, after count, target and context set. |
属性
| 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 |
Target 属性获取或设置一个值,以指示由客户端请求的目标项。The Target property gets or sets a value to indicate the target entry that was requested by the client. |
| TargetPercentage |
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. |
方法
| Equals(Object) |
确定指定对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
| GetHashCode() |
作为默认哈希函数。Serves as the default hash function. (继承自 Object) |
| GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
| MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
| ToString() |
返回表示当前对象的字符串。Returns a string that represents the current object. (继承自 Object) |