Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T > Class Template Referenceabstract

Abstract base class for implementations of ITemplateLineAggregator<T>. More...

Inheritance diagram for Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T >:
Summer.Batch.Extra.Template.ITemplateLineAggregator< T > Summer.Batch.Common.Factory.IInitializationPostOperations Summer.Batch.Infrastructure.Item.File.IHeaderWriter Summer.Batch.Infrastructure.Item.File.IFooterWriter

Public Member Functions

void AfterPropertiesSet ()
 Post Initialization operation. More...
 
string Aggregate (T item)
 Transforms an item into a line using a template read from a file. More...
 
virtual void WriteHeader (TextWriter writer)
 Subclasses may override this More...
 
virtual void WriteFooter (TextWriter writer)
 Subclasses may override this More...
 

Protected Member Functions

 AbstractTemplateLineAggregator ()
 Default constructor that sets the default values. More...
 
string GetFormattedLine (string lineId, IEnumerable< object > parameters)
 Formats and return the specified line. More...
 
abstract IEnumerable< object > GetParameters (T item)
 Returns the parameters to use when formatting the template line. More...
 

Properties

IResource Template [get, set]
 A resource to the template file. More...
 
Encoding InputEncoding [get, set]
 The encoding of the template file. Default is Encoding.Default. More...
 
CultureInfo Culture [get, set]
 The culture to use when formatting lines. Default is CultureInfo.CurrentCulture. More...
 
string LineSeparator [get, set]
 The line separator to use when aggregating several lines. Default is Environment.NewLine. More...
 
string TemplateId [get, set]
 The id of the template line to use. More...
 
- Properties inherited from Summer.Batch.Extra.Template.ITemplateLineAggregator< T >
string TemplateId [set]
 The id of the template line to use. More...
 

Detailed Description

Abstract base class for implementations of ITemplateLineAggregator<T>.

Template Parameters
T 

Constructor & Destructor Documentation

Default constructor that sets the default values.

Member Function Documentation

Post Initialization operation.

Implements Summer.Batch.Common.Factory.IInitializationPostOperations.

Transforms an item into a line using a template read from a file.

Parameters
itemthe item to transform
Returns
the line corresponding to the given item
string Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T >.GetFormattedLine ( string  lineId,
IEnumerable< object >  parameters 
)
protected

Formats and return the specified line.

Parameters
lineIdthe id of the line to get
parametersthe parameters for formatting the line
Returns
the formatted line
abstract IEnumerable<object> Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T >.GetParameters ( item)
protectedpure virtual

Returns the parameters to use when formatting the template line.

Parameters
itemthe item to display
Returns
the parameters of the current line corresponding to item
virtual void Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T >.WriteFooter ( TextWriter  writer)
virtual

Subclasses may override this

Parameters
writer

Implements Summer.Batch.Infrastructure.Item.File.IFooterWriter.

virtual void Summer.Batch.Extra.Template.AbstractTemplateLineAggregator< T >.WriteHeader ( TextWriter  writer)
virtual

Subclasses may override this

Parameters
writer

Implements Summer.Batch.Infrastructure.Item.File.IHeaderWriter.

Property Documentation

The culture to use when formatting lines. Default is CultureInfo.CurrentCulture.

The encoding of the template file. Default is Encoding.Default.

The line separator to use when aggregating several lines. Default is Environment.NewLine.

A resource to the template file.

The id of the template line to use.


The documentation for this class was generated from the following file:
  • Summer.Batch.Extra/Template/AbstractTemplateLineAggregator.cs