using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
namespace Swan.Mappers {
///
/// Represents an object map.
///
/// The type of the source.
/// The type of the destination.
///
public class ObjectMap : IObjectMap {
internal ObjectMap(IEnumerable intersect) {
this.SourceType = typeof(TSource);
this.DestinationType = typeof(TDestination);
this.Map = intersect.ToDictionary(property => this.DestinationType.GetProperty(property.Name), property => new List { this.SourceType.GetProperty(property.Name) });
}
///
public Dictionary> Map {
get;
}
///
public Type SourceType {
get;
}
///
public Type DestinationType {
get;
}
}
}