MetadataUpdateHandlerAttribute 類別

定義

指出應該接收中繼資料更新通知的類型。

public ref class MetadataUpdateHandlerAttribute sealed : Attribute
[System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)]
public sealed class MetadataUpdateHandlerAttribute : Attribute
[<System.AttributeUsage(System.AttributeTargets.Assembly, AllowMultiple=true)>]
type MetadataUpdateHandlerAttribute = class
    inherit Attribute
Public NotInheritable Class MetadataUpdateHandlerAttribute
Inherits Attribute
繼承
MetadataUpdateHandlerAttribute
屬性

備註

Type這個屬性指定的 應該實作符合下列一或多個 (方法可見度的靜態方法,並不會影響) :

  • static void ClearCache(Type[]? updatedTypes)
  • static void UpdateApplication(Type[]? updatedTypes)

套用中繼資料更新之後, ClearCache 會針對指定一個的處理常式叫用。 這可讓更新處理常式有機會清除根據應用程式中繼資料推斷的任何快取。 叫用所有 ClearCache 方法之後, UpdateApplication 會針對指定其中一個的處理常式叫用。 這可讓應用程式重新整理應用程式狀態、觸發 UI 重新轉譯或其他這類反應。 指定時, updatedTypes 參數會包含受到中繼資料更新影響的型別集合;如果是 null ,則任何類型可能已經更新。

建構函式

MetadataUpdateHandlerAttribute(Type)

初始化屬性。

屬性

HandlerType

取得處理中繼資料更新的型別,並在發生任何情況時收到通知。

TypeId

在衍生類別中實作時,取得這個 Attribute 的唯一識別碼。

(繼承來源 Attribute)

方法

Equals(Object)

傳回值,這個值指出此執行個體是否與指定的物件相等。

(繼承來源 Attribute)
GetHashCode()

傳回這個執行個體的雜湊碼。

(繼承來源 Attribute)
GetType()

取得目前執行個體的 Type

(繼承來源 Object)
IsDefaultAttribute()

在衍生類別中覆寫時,表示這個執行個體的值是衍生類別的預設值。

(繼承來源 Attribute)
Match(Object)

在衍生類別中覆寫時,會傳回值,表示這個執行個體是否等於指定物件。

(繼承來源 Attribute)
MemberwiseClone()

建立目前 Object 的淺層複製。

(繼承來源 Object)
ToString()

傳回代表目前物件的字串。

(繼承來源 Object)

適用於