Pear<T>

References
public sealed class Pear<T> : IPear
This class is the generic implementation of the IPear interface.
T

Properties

Explicit

IPear.Item

#
Gets the Item.
Item

Item

#
public T Item { get; }
Gets the item value.

Meta

#
public MetaData Meta { get; }
Gets the meta data associated with the item.
Meta

Type

#
public Type Type { get; }
Gets the exact (cached) type of the Item.
Type

Methods

Create

#
public static Pear<T> Create(T item, MetaData meta)
Create a pear from a value and metadata. If the value is null, a null pear will be returned.
item (T)
meta (MetaData)

Create

#
public static Pear<T> Create(T item)
Create a pear from a value. If the value is null, a null pear will be returned.
item (T)

Iterate

#
public static IEnumerable<Pear<T>> Iterate(IEnumerable<T> items, IEnumerable<MetaData> metaData)
Iterate over a collection of items and a collection of meta data.
items (IEnumerable<T>)Items to iterate over.
metaData (IEnumerable<MetaData>)Matching collection of meta data.
Pear iterator.

Iterate

#
public static IEnumerable<Pear<T>> Iterate(IEnumerable<T> items)
Iterate over a collection and wrap each one in a pear.
items (IEnumerable<T>)Items to iterate over.
Pear iterator.

ToString

#
public override string ToString()
Describe this pear.
Object.ToString