Summer.Batch.Infrastructure.Item.File.Transform.PassThroughFieldExtractor Class Reference

An implementation of T:IFieldExtractor that returns the original item. If it is an array it is returned as is. Collections, dictionaries, and field sets are converted to array. In any other cases the object is wrapped in a single element array. More...

Inheritance diagram for Summer.Batch.Infrastructure.Item.File.Transform.PassThroughFieldExtractor:
Summer.Batch.Infrastructure.Item.File.Transform.IFieldExtractor< object >

Public Member Functions

object[] Extract (dynamic item)
 Extracts an item to an array. The parameter is dynamic because the extraction depends on the runtime type. More...
 
- Public Member Functions inherited from Summer.Batch.Infrastructure.Item.File.Transform.IFieldExtractor< object >
object[] Extract (T item)
 Extracts an item to an array. More...
 

Detailed Description

An implementation of T:IFieldExtractor that returns the original item. If it is an array it is returned as is. Collections, dictionaries, and field sets are converted to array. In any other cases the object is wrapped in a single element array.

This implementation relies on the contravariance of the type parameter of T:IFieldExtractor, thus it can be used at any place where an T:IFieldExtractor is expected as long as the type parameter is a reference type (i.e., if T is the type parameter you should have the following constraint : "<c>where T : class</c>").

Member Function Documentation

object [] Summer.Batch.Infrastructure.Item.File.Transform.PassThroughFieldExtractor.Extract ( dynamic  item)

Extracts an item to an array. The parameter is dynamic because the extraction depends on the runtime type.

Parameters
itemthe item to extract
Returns
an array representing the given item

The documentation for this class was generated from the following file:
  • Summer.Batch.Infrastructure/Item/File/Transform/PassThroughFieldExtractor.cs