PrincipalSearcher Class

PrincipalSearcher Class

.NET Framework (current version)
 

Encapsulates the methods and search patterns used to execute a query against the underlying principal store.

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

System.Object
  System.DirectoryServices.AccountManagement.PrincipalSearcher

[DirectoryServicesPermissionAttribute(SecurityAction.LinkDemand, 
	Unrestricted = true)]
[DirectoryServicesPermissionAttribute(SecurityAction.InheritanceDemand, 
	Unrestricted = true)]
public class PrincipalSearcher : IDisposable

NameDescription
System_CAPS_pubmethodPrincipalSearcher()

Initializes a new instance of the PrincipalSearcher class. The QueryFilter property must be set before the Principal searcher object can be used to perform a search.

System_CAPS_pubmethodPrincipalSearcher(Principal)

Initializes a new instance of the PrincipalSearcher class with the specified query filter.

NameDescription
System_CAPS_pubpropertyContext

Gets that principal context that is used to perform the query. The context specifies the server or domain against which search operations are performed.

System_CAPS_pubpropertyQueryFilter

Gets or sets the query filter that is used to locate matching principals.

NameDescription
System_CAPS_pubmethodDispose()

Disposes the current instance of the PrincipalSearcher object.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodFindAll()

Returns a principal search result that contains a collection of all the principal objects that match the principal specified in the query filter property.

System_CAPS_pubmethodFindOne()

Returns a principal search result that contains the first principal object found that matches the principal specified in the QueryFilter property.

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_pubmethodGetUnderlyingSearcher()

Returns the underlying search object that is used by the Account Management API to perform the search.

System_CAPS_pubmethodGetUnderlyingSearcherType()

Returns the type of the object returned from the GetUnderlyingSearcher method.

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The default page size of 256 KB is used when the PrincipalSearcher class performs a query for domain principals. The application may override the default value by setting the PageSize property in the underlying DirectorySearcher object that is returned from the GetUnderlyingSearcher method.

.NET Framework
Available since 3.5

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show:
© 2016 Microsoft