IGLib  1.7.2
The IGLib base library for development of numerical, technical and business applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Lib.SerializationDto Class Reference

Auxiliary base class for DTOs, contains some static methods. Provided for simplicity, such that one does not need to state type parameters More...

+ Inheritance diagram for IG.Lib.SerializationDto:

Static Public Member Functions

static ObjectType CopyToObjectReturned< DtoType, ObjectType > (DtoType dto, ObjectType obj)
 Replacement for CopyToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied. More...
 
static void CopyToObject< DtoType, ObjectType > (DtoType dto, ref ObjectType obj)
 Copies object state form the specified DTO (data transfer object) to the specified object. More...
 
static DtoType CopyFromObjectReturned< DtoType, ObjectType > (ObjectType obj, DtoType dto)
 Replacement for CopyFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied. More...
 
static void CopyFromObject< DtoType, ObjectType > (ObjectType obj, ref DtoType dto)
 Copies object state form the specified object to the corresponding DTO (data transfer object). More...
 
static ObjectType[] CopyArrayToObjectReturned< DtoType, ObjectType > (DtoType[] tabDto, ObjectType[] tabObj)
 Replacement for CopyArrayToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More...
 
static void CopyArrayToObject< DtoType, ObjectType > (DtoType[] tabDto, ref ObjectType[] tabObj)
 Copies array of DTOs (Data Transfer Objects) to an array of appropriate objects. More...
 
static DtoType[] CopyArrayFromObjectReturned< DtoType, ObjectType > (ObjectType[] tabObj, DtoType[] tabDto)
 Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More...
 
static void CopyArrayFromObject< DtoType, ObjectType > (ObjectType[] tabObj, ref DtoType[] tabDto)
 Copies array of objects to an array of DTOs. More...
 
static List< ObjectType > CopyListToObjectReturned< DtoType, ObjectType > (DtoType[] tabDto, List< ObjectType > listObj)
 Replacement for CopyListToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More...
 
static void CopyListToObject< DtoType, ObjectType > (DtoType[] tabDto, ref List< ObjectType > listObj)
 Copies array of DTOs (Data Transfer Objects) to a list of appropriate objects. More...
 
static DtoType[] CopyListFromObjectReturned< DtoType, ObjectType > (List< ObjectType > tabObj, DtoType[] tabDto)
 Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied. More...
 
static void CopyListFromObject< DtoType, ObjectType > (List< ObjectType > tabObj, ref DtoType[] tabDto)
 Copies array of objects to a list of DTOs. More...
 

Protected Member Functions

 SerializationDto ()
 

Detailed Description

Auxiliary base class for DTOs, contains some static methods. Provided for simplicity, such that one does not need to state type parameters

Constructor & Destructor Documentation

IG.Lib.SerializationDto.SerializationDto ( )
inlineprotected

Member Function Documentation

static ObjectType IG.Lib.SerializationDto.CopyToObjectReturned< DtoType, ObjectType > ( DtoType  dto,
ObjectType  obj 
)
inlinestatic

Replacement for CopyToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied.

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyToObject< DtoType, ObjectType > ( DtoType  dto,
ref ObjectType  obj 
)
inlinestatic

Copies object state form the specified DTO (data transfer object) to the specified object.

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType}
Template Parameters
ObjectTypeObject type.
and must have a public argumentlsee constructor.
Parameters
dtoData transfer object (DTO) from which data is copied.
objObject to which data is copied.
Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static DtoType IG.Lib.SerializationDto.CopyFromObjectReturned< DtoType, ObjectType > ( ObjectType  obj,
DtoType  dto 
)
inlinestatic

Replacement for CopyFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which object state is copied.

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyFromObject< DtoType, ObjectType > ( ObjectType  obj,
ref DtoType  dto 
)
inlinestatic

Copies object state form the specified object to the corresponding DTO (data transfer object).

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType} and must have a public argumentlsee constructor.
ObjectTypeType of the object.
Parameters
objObject from which data is copied.
dtoData transfer object (DTO) to which data is copied.
Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static ObjectType [] IG.Lib.SerializationDto.CopyArrayToObjectReturned< DtoType, ObjectType > ( DtoType[]  tabDto,
ObjectType[]  tabObj 
)
inlinestatic

Replacement for CopyArrayToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied.

tabObj = CopyArrayToObjectReturned<DtoType>(tabDto, tabObj);

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyArrayToObject< DtoType, ObjectType > ( DtoType[]  tabDto,
ref ObjectType[]  tabObj 
)
inlinestatic

Copies array of DTOs (Data Transfer Objects) to an array of appropriate objects.

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType} and must have a public argumentlsee constructor.
ObjectTypeObject type.
Parameters
tabDtoTable of DTOs from which data (object states) is copied.
tabObjTable of objects to which data (object states) is copied.
Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static DtoType [] IG.Lib.SerializationDto.CopyArrayFromObjectReturned< DtoType, ObjectType > ( ObjectType[]  tabObj,
DtoType[]  tabDto 
)
inlinestatic

Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied.

tabDto = CopyArrayFromObjectReturned<DtoType>(tabObj, tabDto)

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyArrayFromObject< DtoType, ObjectType > ( ObjectType[]  tabObj,
ref DtoType[]  tabDto 
)
inlinestatic

Copies array of objects to an array of DTOs.

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType} and must have a public argumentlsee constructor.
ObjectTypeObject type.
Parameters
tabObjTable of objects from which data (object states) is copied.
tabDtoTable of DTOs to which data (object states) is copied.
Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static List<ObjectType> IG.Lib.SerializationDto.CopyListToObjectReturned< DtoType, ObjectType > ( DtoType[]  tabDto,
List< ObjectType >  listObj 
)
inlinestatic

Replacement for CopyListToObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied.

listObj = CopyListToObjectReturned<DtoType>(tabDto, listObj)

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyListToObject< DtoType, ObjectType > ( DtoType[]  tabDto,
ref List< ObjectType >  listObj 
)
inlinestatic

Copies array of DTOs (Data Transfer Objects) to a list of appropriate objects.

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType}
Template Parameters
ObjectTypeObject type.
and must have a public argumentlsee constructor.
Parameters
tabDtoTable of DTOs from which data (object states) is copied.
listObjList of objects to which data (object states) is copied.
Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static DtoType [] IG.Lib.SerializationDto.CopyListFromObjectReturned< DtoType, ObjectType > ( List< ObjectType >  tabObj,
DtoType[]  tabDto 
)
inlinestatic

Replacement for CopyArrayFromObject for cases where object can not be passed by reference. The returned object must be assigned to object (property, list element, etc.) to which data is copied.

tabDto = CopyArrayFromObjectReturned<DtoType>(tabObj, tabDto)

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 
static void IG.Lib.SerializationDto.CopyListFromObject< DtoType, ObjectType > ( List< ObjectType >  tabObj,
ref DtoType[]  tabDto 
)
inlinestatic

Copies array of objects to a list of DTOs.

Template Parameters
DtoTypeType of the DTO, must inherit from SerializationDtoBase{Type, BaseType} and must have a public argumentlsee constructor.
ObjectTypeObject type.
Parameters
tabObjList of objects from which data (object states) is copied.
tabDtoTable of DTOs to which data (object states) is copied.

Parameter tabDto is an array because DTOs are normally not put into lists (since generic types can not be correctly serialized and deserialized by all kinds of serializers).

Type Constraints
DtoType :class 
DtoType :ISerializationDtoAux<ObjectType> 
DtoType :new() 
ObjectType :class 

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