共用方式為


CacheEntryExtensions.SetPriority(ICacheEntry, CacheItemPriority) 方法

定義

設定於設定記憶體壓力權杖清除期間,將快取項目保留在快取中的優先順序。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Caching::Memory::ICacheEntry ^ SetPriority(Microsoft::Extensions::Caching::Memory::ICacheEntry ^ entry, Microsoft::Extensions::Caching::Memory::CacheItemPriority priority);
public static Microsoft.Extensions.Caching.Memory.ICacheEntry SetPriority (this Microsoft.Extensions.Caching.Memory.ICacheEntry entry, Microsoft.Extensions.Caching.Memory.CacheItemPriority priority);
static member SetPriority : Microsoft.Extensions.Caching.Memory.ICacheEntry * Microsoft.Extensions.Caching.Memory.CacheItemPriority -> Microsoft.Extensions.Caching.Memory.ICacheEntry
<Extension()>
Public Function SetPriority (entry As ICacheEntry, priority As CacheItemPriority) As ICacheEntry

參數

entry
ICacheEntry

要設定優先順序的項目。

priority
CacheItemPriority

要在項目中設定的 CacheItemPriority

傳回

用於鏈結的 ICacheEntry

適用於