Principal.FindByIdentityWithType Method (PrincipalContext, Type, String)

 

Returns a principal object that matches the specified identity type, and value. This method is called by the implementation of the derived-class FindByIdentity method to restrict the search to the derived class type and is not intended to be called directly from your code.

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

[SecurityCriticalAttribute]
protected static Principal FindByIdentityWithType(
	PrincipalContext context,
	Type principalType,
	string identityValue
)

Parameters

context
Type: System.DirectoryServices.AccountManagement.PrincipalContext

The PrincipalContext that specifies the server or domain against which operations are performed.

principalType
Type: System.Type

The type of object for which results are returned. This must of type Principal or a type derived from the Principal class.

identityValue
Type: System.String

The identity of the principal.

Return Value

Type: System.DirectoryServices.AccountManagement.Principal

A Principal object that matches the specified identity value and type, or null if no matches are found.

.NET Framework
Available since 3.5
Return to top
Show: