Share via


CacheEnumerable Generic Class

Wraps IEnumerable and adds a cache in the form of a list. It incrementally populates the cache as the source collection is enumerated. Subsequent requests for elements that are cached are returned from the cache. It does not need to iterate thru the whole collection before using the cache. This element is introduced in Windows PowerShell 5.0.

Namespace: Microsoft.OneGet.Utility.Collections
Assembly: Microsoft.OneGet.Utility (in Microsoft.OneGet.Utility.dll)

Usage

'Usage
Dim instance As CacheEnumerable(Of T)

Syntax

'Declaration
Public Class CacheEnumerable(Of T)
    Implements IEnumerable(Of T), IEnumerable
public class CacheEnumerable<T> : IEnumerable<T>, IEnumerable
generic<typename T>
public ref class CacheEnumerable : IEnumerable<T>, IEnumerable

GenericParameters

  • T

Inheritance Hierarchy

System.Object
  Microsoft.OneGet.Utility.Collections.CacheEnumerable

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Target Platforms

See Also

Reference

CacheEnumerable Members
Microsoft.OneGet.Utility.Collections Namespace