PeanutButter
Loading...
Searching...
No Matches
PeanutButter.Utils.EnumerableWrapper Class 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:
PeanutButter.Utils.IEnumerableWrapper PeanutButter.Utils.EnumerableWrapper< T >

Public Member Functions

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

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.

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.

Constructor & Destructor Documentation

◆ EnumerableWrapper()

PeanutButter.Utils.EnumerableWrapper.EnumerableWrapper ( object toWrap)

Construct an EnumerableWrapper around a (hopefully) enumerable object.

Parameters
toWrap

Member Function Documentation

◆ MakeEnumerator< T >()

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

Creates the enumerator.

Template Parameters
T
Returns

Property Documentation

◆ IsValid

bool PeanutButter.Utils.EnumerableWrapper.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:
  • source/Utils/PeanutButter.Utils/EnumerableWrapper.cs