PrincipalSearcher.QueryFilter Property

Definition

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

public:
 property System::DirectoryServices::AccountManagement::Principal ^ QueryFilter { System::DirectoryServices::AccountManagement::Principal ^ get(); void set(System::DirectoryServices::AccountManagement::Principal ^ value); };
public System.DirectoryServices.AccountManagement.Principal QueryFilter { get; set; }
public System.DirectoryServices.AccountManagement.Principal QueryFilter { [System.Security.SecurityCritical] get; [System.Security.SecurityCritical] set; }
member this.QueryFilter : System.DirectoryServices.AccountManagement.Principal with get, set
[<get: System.Security.SecurityCritical>]
[<set: System.Security.SecurityCritical>]
member this.QueryFilter : System.DirectoryServices.AccountManagement.Principal with get, set
Public Property QueryFilter As Principal

Property Value

The Principal object that is used for the query or null if no filter is set.

Attributes

Exceptions

Persisted Principal objects can not be used as the QueryFilter.

The QueryFilter cannot be null or empty.

Remarks

The principal object contained in this property can be any type of object derived from the principal class: computer, user, or group. The QueryFilter can also be an extended principal type that is defined by extending either Principal, UserPrincipal, GroupPrincipal or ComputerPrincipal. The type of the derived class object that is passed to this property determines the type of object that is queried. The resulting query contains a logical AND of all the properties set on the specified principal object. For more information, see the Query by Example overview topic. For more information on the extended classes, see the Principal Extensions overview topic.

Applies to

See also