Craig's Utility Library  4.0 Beta
Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right > Class Template Referenceabstract

Type mapping base class More...

Inheritance diagram for Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >:
Utilities.DataTypes.DataMapper.Interfaces.ITypeMapping< Left, Right > Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >

Public Member Functions

abstract ITypeMapping< Left, Right > AddMapping (Expression< Func< Left, object >> LeftExpression, Expression< Func< Right, object >> RightExpression)
 Adds a mapping More...
 
abstract ITypeMapping< Left, Right > AddMapping (Func< Left, object > LeftGet, Action< Left, object > LeftSet, Expression< Func< Right, object >> RightExpression)
 Adds a mapping More...
 
abstract ITypeMapping< Left, Right > AddMapping (Expression< Func< Left, object >> LeftExpression, Func< Right, object > RightGet, Action< Right, object > RightSet)
 Adds a mapping More...
 
abstract ITypeMapping< Left, Right > AddMapping (Func< Left, object > LeftGet, Action< Left, object > LeftSet, Func< Right, object > RightGet, Action< Right, object > RightSet)
 Adds a mapping More...
 
virtual ITypeMapping AutoMap ()
 Automatically maps properties that are named the same thing More...
 
void Copy (object Source, object Destination)
 Copies from the source to the destination More...
 
abstract void Copy (Left Source, Right Destination)
 Copies from the source to the destination More...
 
abstract void Copy (Right Source, Left Destination)
 Copies from the source to the destination More...
 
abstract void CopyLeftToRight (Left Source, Right Destination)
 Copies from the source to the destination (used in instances when both Left and Right are the same type and thus Copy is ambiguous) More...
 
abstract void CopyRightToLeft (Right Source, Left Destination)
 Copies from the source to the destination (used in instances when both Left and Right are the same type and thus Copy is ambiguous) More...
 

Protected Member Functions

 TypeMappingBase ()
 Constructor More...
 

Properties

ConcurrentBag< IMapping< Left, Right > > Mappings [get]
 List of mappings More...
 

Detailed Description

Type mapping base class

Definition at line 37 of file TypeMappingBase.cs.

Constructor & Destructor Documentation

Constructor

Definition at line 42 of file TypeMappingBase.cs.

Member Function Documentation

abstract ITypeMapping<Left, Right> Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.AddMapping ( Expression< Func< Left, object >>  LeftExpression,
Expression< Func< Right, object >>  RightExpression 
)
pure virtual

Adds a mapping

Parameters
LeftExpressionLeft expression
RightExpressionRight expression
Returns
This

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract ITypeMapping<Left, Right> Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.AddMapping ( Func< Left, object >  LeftGet,
Action< Left, object >  LeftSet,
Expression< Func< Right, object >>  RightExpression 
)
pure virtual

Adds a mapping

Parameters
LeftGetLeft get function
LeftSetLeft set action
RightExpressionRight expression
Returns
This

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract ITypeMapping<Left, Right> Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.AddMapping ( Expression< Func< Left, object >>  LeftExpression,
Func< Right, object >  RightGet,
Action< Right, object >  RightSet 
)
pure virtual

Adds a mapping

Parameters
LeftExpressionLeft expression
RightGetRight get function
RightSetRight set function
Returns
This

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract ITypeMapping<Left, Right> Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.AddMapping ( Func< Left, object >  LeftGet,
Action< Left, object >  LeftSet,
Func< Right, object >  RightGet,
Action< Right, object >  RightSet 
)
pure virtual

Adds a mapping

Parameters
LeftGetLeft get function
LeftSetLeft set function
RightGetRight get function
RightSetRight set function
Returns
This

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

Automatically maps properties that are named the same thing

Returns
This

Definition at line 92 of file TypeMappingBase.cs.

void Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.Copy ( object  Source,
object  Destination 
)

Copies from the source to the destination

Parameters
SourceSource object
DestinationDestination object

Definition at line 132 of file TypeMappingBase.cs.

abstract void Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.Copy ( Left  Source,
Right  Destination 
)
pure virtual

Copies from the source to the destination

Parameters
SourceSource object
DestinationDestination object

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract void Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.Copy ( Right  Source,
Left  Destination 
)
pure virtual

Copies from the source to the destination

Parameters
SourceSource object
DestinationDestination object

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract void Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.CopyLeftToRight ( Left  Source,
Right  Destination 
)
pure virtual

Copies from the source to the destination (used in instances when both Left and Right are the same type and thus Copy is ambiguous)

Parameters
SourceSource
DestinationDestination

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

abstract void Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.CopyRightToLeft ( Right  Source,
Left  Destination 
)
pure virtual

Copies from the source to the destination (used in instances when both Left and Right are the same type and thus Copy is ambiguous)

Parameters
SourceSource
DestinationDestination

Implemented in Utilities.DataTypes.DataMapper.Default.TypeMapping< Left, Right >.

Property Documentation

ConcurrentBag<IMapping<Left, Right> > Utilities.DataTypes.DataMapper.BaseClasses.TypeMappingBase< Left, Right >.Mappings
getprotected

List of mappings

Definition at line 50 of file TypeMappingBase.cs.


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