PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.EnumerableWrapper< T > Class Template Reference

Wraps an object which would be an acceptable enumerable in a foreach (due to .NET compile-time duck-typing) into an actual IEnumerator. More...

Inheritance diagram for PeanutButter.Utils.EnumerableWrapper< T >:
PeanutButter.Utils.IEnumerableWrapper

Public Member Functions

 EnumerableWrapper (object toWrap)
 Construct an EnumerableWrapper around a (hopefully) enumerable object.
 
IEnumerator GetEnumerator ()
 
 EnumerableWrapper (object toWrap)
 

Protected Member Functions

IEnumerator< T > MakeEnumerator< T > ()
 Creates the enumerator.
 

Properties

bool IsValid [get]
 Flag: communicates if the wrapping was successful. Unsuccessful wraps will result in empty enumerations.
 
- Properties inherited from PeanutButter.Utils.IEnumerableWrapper

Detailed Description

Wraps an object which would be an acceptable enumerable in a foreach (due to .NET compile-time duck-typing) into an actual IEnumerator.

Provides the typed EnumerableWrapper.

Template Parameters
T

Constructor & Destructor Documentation

◆ EnumerableWrapper()

Construct an EnumerableWrapper around a (hopefully) enumerable object.

Parameters
toWrap

Member Function Documentation

◆ MakeEnumerator< T >()

IEnumerator< T > PeanutButter.Utils.EnumerableWrapper< T >.MakeEnumerator< T > ( )
protected

Creates the enumerator.

Template Parameters
T
Returns

Property Documentation

◆ IsValid

bool PeanutButter.Utils.EnumerableWrapper< T >.IsValid
get

Flag: communicates if the wrapping was successful. Unsuccessful wraps will result in empty enumerations.

Implements PeanutButter.Utils.IEnumerableWrapper.


The documentation for this class was generated from the following file: