PrincipalSearcher 类

定义

封装用于对基础主体存储区执行查询的方法和搜索模式。Encapsulates the methods and search patterns used to execute a query against the underlying principal store.

public ref class PrincipalSearcher : IDisposable
public class PrincipalSearcher : IDisposable
type PrincipalSearcher = class
    interface IDisposable
Public Class PrincipalSearcher
Implements IDisposable
继承
PrincipalSearcher
实现

注解

PrincipalSearcher类执行域主体查询时, 将使用 256 KB 的默认页面大小。The default page size of 256 KB is used when the PrincipalSearcher class performs a query for domain principals. 应用程序可以通过设置从PageSize GetUnderlyingSearcher方法返回的基础DirectorySearcher对象中的属性来重写默认值。The application may override the default value by setting the PageSize property in the underlying DirectorySearcher object that is returned from the GetUnderlyingSearcher method.

构造函数

PrincipalSearcher()

初始化 PrincipalSearcher 类的新实例。Initializes a new instance of the PrincipalSearcher class. 在可以使用主体搜索器搜索对象之前,必须先设置 QueryFilter 属性。The QueryFilter property must be set before the Principal searcher object can be used to perform a search.

PrincipalSearcher(Principal)

使用指定的查询筛选器初始化 PrincipalSearcher 类的新实例。Initializes a new instance of the PrincipalSearcher class with the specified query filter.

属性

Context

获取用于执行查询的主体上下文。Gets that principal context that is used to perform the query. 上下文指定对其执行搜索操作的服务器或域。The context specifies the server or domain against which search operations are performed.

QueryFilter

获取或设置用于查找匹配主体的查询筛选器。Gets or sets the query filter that is used to locate matching principals.

方法

Dispose()

处置 PrincipalSearcher 对象的当前实例。Disposes the current instance of the PrincipalSearcher object.

Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(继承自 Object)
FindAll()

返回主体搜索结果,其中包含与查询筛选器属性中指定的主体相匹配的所有主体对象的集合。Returns a principal search result that contains a collection of all the principal objects that match the principal specified in the query filter property.

FindOne()

返回一个主体搜索结果,其中包含找到的与 QueryFilter 属性指定的主体相匹配的第一个主体对象。Returns a principal search result that contains the first principal object found that matches the principal specified in the QueryFilter property.

GetHashCode()

用作默认哈希函数。Serves as the default hash function.

(继承自 Object)
GetType()

获取当前实例的 TypeGets the Type of the current instance.

(继承自 Object)
GetUnderlyingSearcher()

返回帐户管理 API 用以执行搜索的基础搜索对象。Returns the underlying search object that is used by the Account Management API to perform the search.

GetUnderlyingSearcherType()

返回从 GetUnderlyingSearcher() 方法返回的对象的类型。Returns the type of the object returned from the GetUnderlyingSearcher() method.

MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(继承自 Object)
ToString()

返回一个表示当前对象的 string。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅