ObjectCache.GetEnumerator Method


When overridden in a derived class, creates an enumerator that can be used to iterate through a collection of cache entries.

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


The enumerator object that provides access to the cache entries in the cache.



Cache implementers can override and extend this method to provide a custom means of iterating through a collection of cache entries.


Returning an enumerator is typically a more expensive operation than returning the entire cache entry.

This method is called by the explicit interface implementations that the ObjectCache class has for the GetEnumerator and GetEnumerator methods.

Applies to