Редагувати

Поділитися через


CacheEntryRemovedArguments Constructor

Definition

Initializes a new instance of the CacheEntryRemovedArguments class.

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)

Parameters

source
ObjectCache

The ObjectCache instance from which cacheItem was removed.

reason
CacheEntryRemovedReason

One of the enumeration values that indicate why cacheItem was removed.

cacheItem
CacheItem

An instance of the cached entry that was removed.

Exceptions

source is null.

-or-

cacheItem is null.

Remarks

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.

Applies to