CommonAcl 類別

定義

代表存取控制清單 (ACL),且為 DiscretionaryAclSystemAcl 類別的基底類別。Represents an access control list (ACL) and is the base class for the DiscretionaryAcl and SystemAcl classes.

public ref class CommonAcl abstract : System::Security::AccessControl::GenericAcl
public abstract class CommonAcl : System.Security.AccessControl.GenericAcl
type CommonAcl = class
    inherit GenericAcl
Public MustInherit Class CommonAcl
Inherits GenericAcl
繼承
CommonAcl
衍生

備註

標準順序是根據下列演算法來維護:Canonical order is maintained according to the following algorithm:

  • 明確的 Ace 優先于繼承的 Ace;此規則適用于 Dacl 和 Sacl。Explicit ACEs take precedence over inherited ACEs; this rule applies to both DACLs and SACLs.

  • 在 Dacl 中, 拒絕存取的 Ace 會優先于允許存取的 Ace。In DACLs, among the explicit ACEs, ACEs that deny access take precedence over ACEs that allow access. 對於目錄物件 Acl, 非物件 Ace 會在物件 Ace 之前。For directory object ACLs, the nonobject ACEs come before object ACEs.

  • 所有常見的 Ace 的優先順序高於 noncommon Ace。All common ACEs take precedence over noncommon ACEs.

  • 繼承的 Ace 會在 canonicity 之後維持其相對順序。Inherited ACEs maintain their relative order after canonicity.

  • Dacl 和 Sacl 中不允許無法辨識和自訂 Ace。Unrecognized and custom ACEs are disallowed in both DACLs and SACLs.

  • 在連續範圍內 (在 dacl 上明確 AccessDenied 和 AccessAllowed ace, sacl 上的所有明確 ace), ace 會使用CompareTo與 ace 相關聯之SecurityIdentifier物件的方法來排序。Within contiguous ranges (explicit AccessDenied and AccessAllowed ACEs on DACLs, all explicit ACEs on SACLs), the ACEs are sorted by using the CompareTo methods of the SecurityIdentifier objects associated with the ACEs.

連續的 Ace 會合並 (如果適用的話)。Adjacent ACEs are combined, if appropriate. 這會減少 ACL 的大小, 而不會影響它所授與的存取控制語義。This reduces the size of the ACL without affecting the access control semantics it grants.

屬性

BinaryLength

取得目前 CommonAcl 物件的二進位表示長度 (以位元組為單位)。Gets the length, in bytes, of the binary representation of the current CommonAcl object. 使用 GetBinaryForm(Byte[], Int32) 方法,將存取控制清單 (ACL) 封送處理至二進位陣列之前,應使用這個長度。This length should be used before marshaling the access control list (ACL) into a binary array by using the GetBinaryForm(Byte[], Int32) method.

Count

取得目前 CommonAcl 物件中的存取控制項目 (ACE) 數目。Gets the number of access control entries (ACEs) in the current CommonAcl object.

IsCanonical

取得布林值,指定目前 CommonAcl 物件中的存取控制項目 (ACE) 是否為標準順序。Gets a Boolean value that specifies whether the access control entries (ACEs) in the current CommonAcl object are in canonical order.

IsContainer

設定 CommonAcl 物件是否為容器。Sets whether the CommonAcl object is a container.

IsDS

設定目前 CommonAcl 物件是否為目錄物件存取控制清單 (ACL)。Sets whether the current CommonAcl object is a directory object access control list (ACL).

IsSynchronized

這個屬性一律設為 falseThis property is always set to false. 其實作的原因僅在於其為 ICollection 介面的實作所需。It is implemented only because it is required for the implementation of the ICollection interface.

(繼承來源 GenericAcl)
Item[Int32]

取得或設定在指定索引處的 CommonAceGets or sets the CommonAce at the specified index.

Revision

取得 CommonAcl 的修訂層級。Gets the revision level of the CommonAcl.

SyncRoot

這個屬性永遠會傳回 nullThis property always returns null. 其實作的原因僅在於其為 ICollection 介面的實作所需。It is implemented only because it is required for the implementation of the ICollection interface.

(繼承來源 GenericAcl)

方法

CopyTo(GenericAce[], Int32)

將目前 GenericAcl 的每個 GenericAce 複製到指定陣列中。Copies each GenericAce of the current GenericAcl into the specified array.

(繼承來源 GenericAcl)
Equals(Object)

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

(繼承來源 Object)
GetBinaryForm(Byte[], Int32)

CommonAcl 物件的內容封送處理到開始於指定位移的指定位元組陣列。Marshals the contents of the CommonAcl object into the specified byte array beginning at the specified offset.

GetEnumerator()

在存取控制清單 (ACL) 中擷取可用來逐一查看存取控制項目 (ACE) 的物件。Retrieves an object that you can use to iterate through the access control entries (ACEs) in an access control list (ACL).

(繼承來源 GenericAcl)
GetHashCode()

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

(繼承來源 Object)
GetType()

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

(繼承來源 Object)
MemberwiseClone()

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

(繼承來源 Object)
Purge(SecurityIdentifier)

移除與指定 SecurityIdentifier 物件相關聯之這個 CommonAcl 物件中包含的所有存取控制項目 (ACE)。Removes all access control entries (ACEs) contained by this CommonAcl object that are associated with the specified SecurityIdentifier object.

RemoveInheritedAces()

從這個 CommonAcl 物件移除所有繼承的存取控制項目 (ACE)。Removes all inherited access control entries (ACEs) from this CommonAcl object.

ToString()

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

(繼承來源 Object)

明確介面實作

ICollection.CopyTo(Array, Int32)

將目前 GenericAcl 的每個 GenericAce 複製到指定陣列中。Copies each GenericAce of the current GenericAcl into the specified array.

(繼承來源 GenericAcl)
IEnumerable.GetEnumerator()

傳回 AceEnumerator 類別的新執行個體,該執行個體轉換成 IEnumerator 介面的執行個體。Returns a new instance of the AceEnumerator class cast as an instance of the IEnumerator interface.

(繼承來源 GenericAcl)

擴充方法

Cast<TResult>(IEnumerable)

IEnumerable 的項目轉換成指定的型別。Casts the elements of an IEnumerable to the specified type.

OfType<TResult>(IEnumerable)

根據指定的型別來篩選 IEnumerable 的項目。Filters the elements of an IEnumerable based on a specified type.

AsParallel(IEnumerable)

啟用查詢的平行化作業。Enables parallelization of a query.

AsQueryable(IEnumerable)

IEnumerable 轉換成 IQueryableConverts an IEnumerable to an IQueryable.

適用於