CacheEntryRemovedArguments Constructor (ObjectCache^, CacheEntryRemovedReason, CacheItem^)
Initializes a new instance of the CacheEntryRemovedArguments class.
Assembly: System.Runtime.Caching (in System.Runtime.Caching.dll)
public:
CacheEntryRemovedArguments(
ObjectCache^ source,
CacheEntryRemovedReason reason,
CacheItem^ cacheItem
)
Parameters
- source
-
Type:
System.Runtime.Caching::ObjectCache^
The ObjectCache instance from which cacheItem was removed.
- reason
-
Type:
System.Runtime.Caching::CacheEntryRemovedReason
One of the enumeration values that indicate why cacheItem was removed.
- cacheItem
-
Type:
System.Runtime.Caching::CacheItem^
An instance of the cached entry that was removed.
| Exception | Condition |
|---|---|
| ArgumentNullException | source is null. -or- cacheItem is null. |
Developers typically use the CacheEntryRemovedArguments class when they want to be notified after a cache entry has been removed from the cache.
When a cache implementation is about to remove one or more cache entries from the cache, the cache implementation calls the CacheEntryRemovedCallback delegate that was registered in the application. When a cache implementation calls the delegate, it typically calls the CacheEntryRemovedArguments constructor to pass to the callback a new CacheEntryRemovedArguments instance that contains information about the cache entry that is being removed. The callback notifies the application that registered the callback about the cache entry that is being removed. After the constructor returns, the CacheEntryRemovedArguments instance contains the details about the removal of the cache entry.
Available since 4.0