Trustee Trustee Trustee Trustee Class

定義

指定存取控制項目套用的使用者帳戶、群組帳戶或登入工作階段 (Session)。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
繼承
TrusteeTrusteeTrusteeTrustee

備註

當您建立存取控制專案時, 信任者就是您要授與或拒絕存取權限的實體。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屬性的值, 才能Trustee使用來設定許可權。You 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() Trustee() Trustee()

初始化 Trustee 類別的新執行個體,而不設定任何它的讀取/寫入屬性。Initializes a new instance of the Trustee class without setting any of its read/write properties.

Trustee(String) Trustee(String) Trustee(String) Trustee(String)

初始化型別為 UnknownTrustee 類別的新執行個體 (Instance)、設定 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) Trustee(String, String) Trustee(String, String) 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(String, String, TrusteeType) Trustee(String, String, TrusteeType) 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 Name Name Name

取得或設定信任項的名稱。Gets or sets the name of the trustee.

SystemName SystemName SystemName SystemName

取得或設定要尋找信任項帳戶的電腦。Gets or sets the computer on which to look up the trustee's account.

TrusteeType TrusteeType TrusteeType TrusteeType

取得或設定信任項的型別,以辨認信任項是使用者、群組、電腦、網域或別名 (Alias)。Gets or sets the type of the trustee, which identifies whether the trustee is a user, group, computer, domain, or alias.

方法

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

判斷指定的物件是否等於目前的物件。Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

做為預設雜湊函式。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

取得目前執行個體的 TypeGets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

建立目前 Object 的淺層複本 (Shallow Copy)。Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

傳回代表目前物件的字串。Returns a string that represents the current object.

(Inherited from Object)

適用於

另請參閱