CacheEntryChangeMonitor 類別

定義

提供表示 ChangeMonitor 型別的基底類別,可實作這個型別以監控快取項目的變更。Provides a base class that represents a ChangeMonitor type that can be implemented in order to monitor changes to cache entries.

public ref class CacheEntryChangeMonitor abstract : System::Runtime::Caching::ChangeMonitor
public abstract class CacheEntryChangeMonitor : System.Runtime.Caching.ChangeMonitor
type CacheEntryChangeMonitor = class
    inherit ChangeMonitor
Public MustInherit Class CacheEntryChangeMonitor
Inherits ChangeMonitor
繼承
CacheEntryChangeMonitor

備註

CacheEntryChangeMonitor類別會提供可針對監視快取專案執行的抽象唯讀屬性。The CacheEntryChangeMonitor class provides abstract, read-only properties that can be implemented for monitoring cache entries. 當快取執行必須監視其本身快取中的專案變更時, 會使用這個類別。This class is used when a cache implementation has to monitor changes to entries in its own cache. 針對快取實作為的快取, CreateCacheEntryChangeMonitor(IEnumerable<String>, String)方法會CacheEntryChangeMonitor傳回類型的實例。 ObjectCacheFor caches that are ObjectCache cache implementations, an instance of the CacheEntryChangeMonitor type is returned by the CreateCacheEntryChangeMonitor(IEnumerable<String>, String) method.

給實施者的注意事項

如需必須遵循之繼承合約的詳細資訊, 請參閱ChangeMonitor類別總覽中的繼承者資訊。For information about the inheritance contract that must be followed, see the information for inheritors in the ChangeMonitor class overview.

建構函式

CacheEntryChangeMonitor()

初始化 CacheEntryChangeMonitor 類別的新執行個體。Initializes a new instance of the CacheEntryChangeMonitor class. 這個建構函式由衍生類別中的建構函式呼叫,來初始化基底類別。This constructor is called from constructors in derived classes to initialize the base class.

屬性

CacheKeys

取得正受到監控 (目的是了解是否有發生變更的情形) 的快取索引鍵的集合。Gets a collection of cache keys that are monitored for changes.

HasChanged

取得值,這個值表示 ChangeMonitor 類別所監控的狀態已變更。Gets a value that indicates that the state that is monitored by the ChangeMonitor class has changed.

(繼承來源 ChangeMonitor)
IsDisposed

取得值,這個值表示是否已經處置 ChangeMonitor 類別的衍生執行個體。Gets a value that indicates that the derived instance of a ChangeMonitor class is disposed.

(繼承來源 ChangeMonitor)
LastModified

取得值,這個值表示所監控之快取項目上次變更的時間 (以 UTC 時間表示)。Gets a value that indicates the latest time (in UTC time) that the monitored cache entry was changed.

RegionName

取得快取區域的名稱。Gets the name of a region of the cache.

UniqueId

取得值,這個值表示 ChangeMonitor 類別執行個體。Gets a value that represents the ChangeMonitor class instance.

(繼承來源 ChangeMonitor)

方法

Dispose()

ChangeMonitor 類別的目前執行個體所使用的資源全部釋出。Releases all resources that are used by the current instance of the ChangeMonitor class.

(繼承來源 ChangeMonitor)
Dispose(Boolean)

釋放所有的 Managed 資源和 Unmanaged 資源,以及對 ChangeMonitor 執行個體的所有參考。Releases all managed and unmanaged resources and any references to the ChangeMonitor instance. 這項多載必須由衍生自變更監控的類別實作。This overload must be implemented by derived change-monitor classes.

(繼承來源 ChangeMonitor)
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)
InitializationComplete()

從衍生類別的建構函式進行呼叫,以指出初始化已經完成。Called from the constructor of derived classes to indicate that initialization is finished.

(繼承來源 ChangeMonitor)
MemberwiseClone()

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

(繼承來源 Object)
NotifyOnChanged(OnChangedCallback)

在相依性變更時,由快取實作呼叫來註冊回呼,並透過 ObjectCache 委派通知 OnChangedCallback 執行個體。Called by Cache implementers to register a callback and notify an ObjectCache instance through the OnChangedCallback delegate when a dependency has changed.

(繼承來源 ChangeMonitor)
OnChanged(Object)

在相依性變更時由衍生類別呼叫,以引發事件。Called by derived classes to raise the event when a dependency changes.

(繼承來源 ChangeMonitor)
ToString()

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

(繼承來源 Object)

適用於