MemoryCache.GetEnumerator Metodo

Definizione

Crea un enumeratore che può essere usato per scorrere una raccolta di voci della cache.

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))

Restituisce

IEnumerator<KeyValuePair<String,Object>>

Oggetto enumeratore che fornisce l'accesso agli elementi nella cache.

Commenti

L'enumeratore GetEnumerator restituito dal metodo può essere usato per scorrere le voci nella cache.

Importante

Il recupero di un enumeratore per un'istanza MemoryCache è un'operazione a elevato utilizzo di risorse e blocco. Pertanto, l'enumeratore non deve essere usato nelle applicazioni di produzione.

Si applica a