CacheEntryRemovedArguments 建構函式
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
初始化 CacheEntryRemovedArguments 類別的新執行個體。
public:
CacheEntryRemovedArguments(System::Runtime::Caching::ObjectCache ^ source, System::Runtime::Caching::CacheEntryRemovedReason reason, System::Runtime::Caching::CacheItem ^ cacheItem);
public CacheEntryRemovedArguments(System.Runtime.Caching.ObjectCache source, System.Runtime.Caching.CacheEntryRemovedReason reason, System.Runtime.Caching.CacheItem cacheItem);
new System.Runtime.Caching.CacheEntryRemovedArguments : System.Runtime.Caching.ObjectCache * System.Runtime.Caching.CacheEntryRemovedReason * System.Runtime.Caching.CacheItem -> System.Runtime.Caching.CacheEntryRemovedArguments
Public Sub New (source As ObjectCache, reason As CacheEntryRemovedReason, cacheItem As CacheItem)
參數
- source
- ObjectCache
ObjectCache被移除的實例cacheItem。
- reason
- CacheEntryRemovedReason
其中一個用於說明原因 cacheItem 的列舉值被移除。
- cacheItem
- CacheItem
一個被移除的快取項目實例。
例外狀況
備註
開發者通常在希望快取項目被移除後收到通知時,會使用這個 CacheEntryRemovedArguments 類別。
當快取實作準備從快取中移除一個或多個快取條目時,快取實作會呼叫 CacheEntryRemovedCallback 該應用程式中註冊的代理。 當快取實作呼叫代理時,通常會呼叫 CacheEntryRemovedArguments 建構子,將包含即將移除快取條目的資訊的新實例傳給回調 CacheEntryRemovedArguments 器。 回調會通知註冊回調的應用程式即將移除快取條目。 建構子回傳後,實 CacheEntryRemovedArguments 例會包含關於快取條目移除的細節。