MemoryCache.GetEnumerator 方法

定義

建立列舉值,可用來逐一查看快取專案的集合。

protected:
 override System::Collections::Generic::IEnumerator<System::Collections::Generic::KeyValuePair<System::String ^, System::Object ^>> ^ GetEnumerator();
protected override System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string,object>> GetEnumerator();
override this.GetEnumerator : unit -> System.Collections.Generic.IEnumerator<System.Collections.Generic.KeyValuePair<string, obj>>
Protected Overrides Function GetEnumerator () As IEnumerator(Of KeyValuePair(Of String, Object))

傳回

列舉器物件提供快取中項目的存取權限。

備註

該方法回傳 GetEnumerator 的列舉子可用來遍歷快取中的條目。

Important

為實例檢索列舉 MemoryCache 器是一個資源密集且阻塞性的操作。 因此,調查器不應用於生產應用。

適用於