# Class Mapper<T>

Namespace
  adas_core.Domain.Utils

Assembly
  adas-core.Domain.dll

    public static class Mapper<T> where T : class

#### Type Parameters

`T`

Inheritance
  object
  Mapper<T>

Inherited Members
  object.Equals(object)
  object.Equals(object, object)
  object.GetHashCode()
  object.GetType()
  object.MemberwiseClone()
  object.ReferenceEquals(object, object)
  object.ToString()

## Methods

### Map(ExpandoObject, T)

Maps properties from an ExpandoObject source to a strongly-typed destination object using a pre-defined property map. Property lookups are case-insensitive. Null values are only assigned to reference types or Nullable<T> types; assigning null to a non-nullable value type throws. When a source value's type does not match the destination property's type, the value is converted using ToDouble(object).

    public static void Map(ExpandoObject source, T destination)

#### Parameters

`source` ExpandoObject

  The source ExpandoObject whose key-value pairs will be mapped onto the destination.

`destination` T

  The target object that will receive the mapped property values.

#### Exceptions

ArgumentNullException

  Thrown when `source` or `destination` is null.

ArgumentException

  Thrown when a source value is null but the corresponding destination property is a value type that is not Nullable<T>.