SearchResultCollection 类
定义
该 SearchResultCollection 类包含在 SearchResult 查询过程中由 Active Directory 层次结构返回的 DirectorySearcher 实例。The SearchResultCollection class contains the SearchResult instances that the Active Directory hierarchy returned during a DirectorySearcher query.
public ref class SearchResultCollection : MarshalByRefObject, IDisposable, System::Collections::ICollection
public class SearchResultCollection : MarshalByRefObject, IDisposable, System.Collections.ICollection
type SearchResultCollection = class
inherit MarshalByRefObject
interface ICollection
interface IEnumerable
interface IDisposable
Public Class SearchResultCollection
Inherits MarshalByRefObject
Implements ICollection, IDisposable
- 继承
- 实现
注解
由于实现限制, 在SearchResultCollection垃圾回收类时, 该类无法释放其所有非托管资源。Due to implementation restrictions, the SearchResultCollection class cannot release all of its unmanaged resources when it is garbage collected. 若要防止内存泄露, 必须在不再需要Dispose该SearchResultCollection对象时调用方法。To prevent a memory leak, you must call the Dispose method when the SearchResultCollection object is no longer needed.
属性
Count |
获取此集合中 SearchResult 对象的数目。Gets the number of SearchResult objects in this collection. |
Handle |
获取由执行实际搜索的 |
Item[Int32] |
获取位于此集合中指定索引处的 SearchResult 对象。Gets the SearchResult object that is located at a specified index in this collection. |
PropertiesLoaded |
获取在执行搜索前指定的 DirectorySearcher 属性。Gets the DirectorySearcher properties that were specified before the search was executed. |
方法
Contains(SearchResult) |
确定指定的 SearchResult 对象是否在此集合中。Determines if a specified SearchResult object is in this collection. |
CopyTo(SearchResult[], Int32) |
将此集合中的所有 SearchResult 对象复制到特定数组,从目标数组的指定索引处开始。Copies all SearchResult objects in this collection to the specific array, starting at the specified index in the target array. |
CreateObjRef(Type) |
创建一个对象,该对象包含生成用于与远程对象进行通信的代理所需的全部相关信息。Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. (继承自 MarshalByRefObject) |
Dispose() |
释放由 SearchResultCollection 对象使用的所有资源。Releases all resources that are used by the SearchResultCollection object. |
Dispose(Boolean) |
释放由 SearchResultCollection 对象占用的非托管资源,还可以选择释放托管资源。Releases the unmanaged resources that are used by the SearchResultCollection object and optionally releases the managed resources. |
Equals(Object) |
确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object. (继承自 Object) |
Finalize() |
重写 Finalize() 方法。Overrides the Finalize() method. |
GetEnumerator() |
返回可用于循环访问此集合的枚举数。Returns an enumerator that you can use to iterate through this collection. |
GetHashCode() |
用作默认哈希函数。Serves as the default hash function. (继承自 Object) |
GetLifetimeService() |
检索控制此实例的生存期策略的当前生存期服务对象。Retrieves the current lifetime service object that controls the lifetime policy for this instance. (继承自 MarshalByRefObject) |
GetType() |
获取当前实例的 Type。Gets the Type of the current instance. (继承自 Object) |
IndexOf(SearchResult) |
返回指定的 SearchResult 对象在此集合中的第一个匹配项的索引。Returns the index of the first occurrence of the specified SearchResult object in this collection. |
InitializeLifetimeService() |
获取生存期服务对象来控制此实例的生存期策略。Obtains a lifetime service object to control the lifetime policy for this instance. (继承自 MarshalByRefObject) |
MemberwiseClone() |
创建当前 Object 的浅表副本。Creates a shallow copy of the current Object. (继承自 Object) |
MemberwiseClone(Boolean) |
创建当前 MarshalByRefObject 对象的浅表副本。Creates a shallow copy of the current MarshalByRefObject object. (继承自 MarshalByRefObject) |
ToString() |
返回一个表示当前对象的 string。Returns a string that represents the current object. (继承自 Object) |
显式界面实现
ICollection.CopyTo(Array, Int32) |
从特定的 ICollection 索引开始,将 Array 的元素复制到一个 Array 中。Copies the elements of the ICollection to an Array, starting at a particular Array index. |
ICollection.IsSynchronized |
获取一个值,该值指示是否同步对 ICollection 的访问(线程安全)。Gets a value indicating whether access to the ICollection is synchronized (thread safe). |
ICollection.SyncRoot |
获取可用于同步对 ICollection 的访问的对象。Gets an object that can be used to synchronize access to the ICollection. |
扩展方法
Cast<TResult>(IEnumerable) |
将 IEnumerable 的元素强制转换为指定的类型。Casts the elements of an IEnumerable to the specified type. |
OfType<TResult>(IEnumerable) |
根据指定类型筛选 IEnumerable 的元素。Filters the elements of an IEnumerable based on a specified type. |
AsParallel(IEnumerable) |
启用查询的并行化。Enables parallelization of a query. |
AsQueryable(IEnumerable) |
将 IEnumerable 转换为 IQueryable。Converts an IEnumerable to an IQueryable. |
安全性
DirectoryServicesPermission
LinkDemand