PrincipalSearcher.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.
public:
property System::DirectoryServices::AccountManagement::PrincipalContext ^ Context { System::DirectoryServices::AccountManagement::PrincipalContext ^ get(); };
public System.DirectoryServices.AccountManagement.PrincipalContext Context { get; }
[get: System.Security.SecurityCritical]
[get: System.Security.SecurityTreatAsSafe]
public System.DirectoryServices.AccountManagement.PrincipalContext Context { get; }
member this.Context : System.DirectoryServices.AccountManagement.PrincipalContext
[<get: System.Security.SecurityCritical>]
[<get: System.Security.SecurityTreatAsSafe>]
member this.Context : System.DirectoryServices.AccountManagement.PrincipalContext
Public ReadOnly Property Context As PrincipalContext
属性值
PrincipalContext 对象,用于指定要对其执行操作的服务器或域。The PrincipalContext object that specifies the server or domain against which operations are performed.
- 属性
注解
PrincipalContext此属性中包含的对象是从属性中主体对象集的上下文属性获取的 QueryFilter 。The PrincipalContext object contained in this property is obtained from the context property of the principal object set in the QueryFilter property. 使用在主体上下文对象和属性中指定的容器中指定的凭据来执行查询 Container 。Queries are performed using the credentials specified in the principal context object and the container specified in the Container property. 对于 Domain 和 ApplicationDirectory 上下文类型,容器是容器对象 (DN) 的可分辨名称。For Domain and ApplicationDirectory context types, the container is the Distinguished Name (DN) of a container object.