共用方式為


AuthorizationAttribute 成員

當做類別的基底類別,這些類別是用來透過自訂中繼資料控制授權。

下表列出 AuthorizationAttribute 型別公開的成員。

受保護的 建構函式

  名稱 說明
  AuthorizationAttribute 初始化 AuthorizationAttribute 類別的新執行個體。

頂端

公用 屬性

  名稱 說明
public property ErrorMessage 取得或設定預定要在 ErrorMessage 中傳回的常值錯誤訊息或資源索引鍵。
public property ResourceType 取得或設定 Type 來當做 ErrorMessage 的資源管理員使用。
public property TypeId  (繼承自 Attribute)

頂端

公用 方法

(另請參閱 受保護的 方法)

  名稱 說明
public method Authorize 判斷是否授權給定主體物件執行給定 AuthorizationContext 所描述的特定作業。
public method Equals  多載。 (繼承自 Attribute)
public methodstatic GetCustomAttribute  多載。 (繼承自 Attribute)
public methodstatic GetCustomAttributes  多載。 (繼承自 Attribute)
public method GetHashCode  (繼承自 Attribute)
public method GetType  (繼承自 Object)
public method IsDefaultAttribute  (繼承自 Attribute)
public methodstatic IsDefined  多載。 (繼承自 Attribute)
public method Match  (繼承自 Attribute)
public methodstatic ReferenceEquals  (繼承自 Object)
public method ToString  (繼承自 Object)

頂端

受保護的 方法

  名稱 說明
protected method Finalize  (繼承自 Object)
protected method FormatErrorMessage 針對目前的 AuthorizationAttribute 取得格式化錯誤訊息,以呈現給使用者。
protected method IsAuthorized 實作特有的方法,可判斷是否授權給定 IPrincipal 物件執行給定 AuthorizationContext 物件所描述的特定作業。
protected method MemberwiseClone  (繼承自 Object)

頂端

明確介面實作

  名稱 說明
  System.Runtime.InteropServices._Attribute.GetIDsOfNames  (繼承自 Attribute)
  System.Runtime.InteropServices._Attribute.GetTypeInfo  (繼承自 Attribute)
  System.Runtime.InteropServices._Attribute.GetTypeInfoCount  (繼承自 Attribute)
  System.Runtime.InteropServices._Attribute.Invoke  (繼承自 Attribute)

頂端

另請參閱

參考

AuthorizationAttribute 類別
System.ComponentModel.DataAnnotations 命名空間