| IGLib 1.4 The IGLib base library for development of numerical, technical and business applications.

- Main Page
- Namespaces
- Classes
- Files
- Directories

- Class List
- Class Index
- Class Hierarchy
- Class Members

Static Public Member Functions | Protected Member Functions

# 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:
[legend]

List of all members.

## Static Public Member Functions
static ObjectType | CopyToObjectReturned< DtoType, ObjectType > (DtoType dto, ObjectType obj)
| Replacement for CopyToObject<DtoType> 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.
static void | CopyToObject< DtoType, ObjectType > (DtoType dto, ref ObjectType obj)
| Copies object state form the specified DTO (data transfer object) to the specified object.
static DtoType | CopyFromObjectReturned< DtoType, ObjectType > (ObjectType obj, DtoType dto)
| Replacement for CopyObjectFromObject<DtoType> 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.
static void | CopyFromObject< DtoType, ObjectType > (ObjectType obj, ref DtoType dto)
| Copies object state form the specified object to the corresponding DTO (data transfer object).
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.
static void | CopyArrayToObject< DtoType, ObjectType > (DtoType[] tabDto, ref ObjectType[] tabObj)
| Copies array of DTOs (Data Transfer Objects) to an array of appropriate objects.
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.
static void | CopyArrayFromObject< DtoType, ObjectType > (ObjectType[] tabObj, ref DtoType[] tabDto)
| Copies array of objects to an array of DTOs.
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.
static void | CopyListToObject< DtoType, ObjectType > (DtoType[] tabDto, ref List< ObjectType > listObj)
| Copies array of DTOs (Data Transfer Objects) to a list of appropriate objects.
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.
static void | CopyListFromObject< DtoType, ObjectType > (List< ObjectType > tabObj, ref DtoType[] tabDto)
| Copies array of objects to a list of DTOs.
## 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 | ( |  | ) | `[inline, protected]`

Reimplemented in IG::Lib::SerializationDto< Type >.

## Member Function Documentation

static ObjectType IG::Lib::SerializationDto::CopyToObjectReturned< DtoType, ObjectType > | ( | DtoType | dto,
|  | ObjectType | obj
| ) |  | `[inline, static]`

Replacement for CopyToObject<DtoType> 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
| ) |  | `[inline, static]`

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

Template Parameters:

  DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.

Parameters:

  dto | Data transfer object (DTO) from which data is copied.
  obj | Object 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
| ) |  | `[inline, static]`

Replacement for CopyObjectFromObject<DtoType> 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
| ) |  | `[inline, static]`

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

Template Parameters:

    DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor. Template Parameters:
    DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.
    Parameters:
    obj | Object from which data is copied.
    dto | Data 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
| ) |  | `[inline, static]`

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
| ) |  | `[inline, static]`

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

Template Parameters:

  DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.

Parameters:

  tabDto | Table of DTOs from which data (object states) is copied.
  tabObj | Table 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
| ) |  | `[inline, static]`

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
| ) |  | `[inline, static]`

Copies array of objects to an array of DTOs.

Template Parameters:

  DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.

Parameters:

  tabObj | Table of objects from which data (object states) is copied.
  tabDto | Table 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
| ) |  | `[inline, static]`

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
| ) |  | `[inline, static]`

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

Template Parameters:

  DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.

Parameters:

  tabDto | Table of DTOs from which data (object states) is copied.
  tabObj | List 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
| ) |  | `[inline, static]`

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
| ) |  | `[inline, static]`

Copies array of objects to a list of DTOs.

Template Parameters:

  DtoType | Type of the DTO, must inherit from SerializationDtoBase<Type, BaseType> and must have a public argumentlsee constructor.

Parameters:

  tabObj | List of objects from which data (object states) is copied.
  tabDto | Table 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:

- SerializationDtoBase.cs

All Classes Namespaces Files Functions Variables Enumerations Properties Events