Trustee 类

定义

指定要向其应用访问控制项的用户帐户、组帐户或登录会话。Specifies a user account, group account, or logon session to which an access control entry applies.

public ref class Trustee
public class Trustee
type Trustee = class
Public Class Trustee
继承
Trustee

注解

受信者是您在创建访问控制项时向其授予或拒绝访问权限的实体。The trustee is the entity to whom you are granting or denying access rights when you create an access control entry. 设置成员 (直接或Trustee使用构造函数) 以指定受信者是用户、计算机还是其他类型。 TrusteeTypeSet the TrusteeType member (either directly or using the Trustee constructor) to specify whether the trustee is a user, computer, or other type. 如果在设置受信者的权限之前未指定受信者类型, 则该类型Unknown默认为。If you do not specify the trustee type before setting permissions for the trustee, the type defaults to Unknown.

使用设置权限之前, 必须为Name属性指定一个值。 TrusteeYou must specify a value for the Name property before using the Trustee to set permissions. Name包含将为其分配新访问权限的用户、组或计算机帐户的名称。The Name contains the name of the user, group, or computer account to which the new access rights will be assigned. 或者, 您可以设置SystemName属性, 以确定在其上查找受信者帐户以解析名称安全标识符的系统的名称。Optionally, you can set the SystemName property to identify the name of the system on which the trustee account is looked up to resolve the name's security identifier. 如果未指定的值SystemName, 则本地计算机将查找帐户名称。If you do not specify a value for SystemName, the local computer looks up the account name.

构造函数

Trustee()

初始化 Trustee 类的新实例,不设置其任何读/写权限。Initializes a new instance of the Trustee class without setting any of its read/write properties.

Trustee(String)

初始化类型为 UnknownTrustee 类的新实例,并将 Name 属性设置为指定的值,将 SystemName 设置为 nullInitializes a new instance of the Trustee class of type Unknown, setting the Name property to the value specified, and the SystemName to null.

Trustee(String, String)

初始化类型为 UnknownTrustee 类的新实例,并将 NameSystemName 属性设置为指定的值。Initializes a new instance of the Trustee class of type Unknown, setting the Name and the SystemName properties to the values specified.

Trustee(String, String, TrusteeType)

初始化指定类型的 Trustee 类的新实例,将 NameSystemName 属性设置为指定的值。Initializes a new instance of the Trustee class of the specified type, setting the Name and the SystemName properties to the values specified.

属性

Name

获取或设置受信者的名称。Gets or sets the name of the trustee.

SystemName

获取或设置要在其上查找受信者的帐户的计算机。Gets or sets the computer on which to look up the trustee's account.

TrusteeType

获取或设置受信者的类型,该类型标识受信者是用户、组、计算机、域还是别名。Gets or sets the type of the trustee, which identifies whether the trustee is a user, group, computer, domain, or alias.

方法

Equals(Object)

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

(继承自 Object)
GetHashCode()

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

(继承自 Object)
GetType()

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

(继承自 Object)
MemberwiseClone()

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

(继承自 Object)
ToString()

返回表示当前对象的字符串。Returns a string that represents the current object.

(继承自 Object)

适用于

另请参阅