Ejemplo n.º 1
0
 public ResolutionContext(TypeMap typeMap, object source, object destination, Type sourceType, Type destinationType, MappingOperationOptions options)
 {
     TypeMap          = typeMap;
     SourceValue      = source;
     DestinationValue = destination;
     AssignTypes(typeMap, sourceType, destinationType);
     InstanceCache = new Dictionary <ResolutionContext, object>();
     Options       = options;
 }
Ejemplo n.º 2
0
        public object Map(object source, object destination, Type sourceType, Type destinationType, Action <IMappingOperationOptions> opts)
        {
            TypeMap typeMap = ConfigurationProvider.FindTypeMapFor(source, sourceType, destinationType);

            var options = new MappingOperationOptions();

            opts(options);

            var context = new ResolutionContext(typeMap, source, destination, sourceType, destinationType, options);

            return(((IMappingEngineRunner)this).Map(context));
        }
Ejemplo n.º 3
0
 public ResolutionContext(TypeMap typeMap, object source, Type sourceType, Type destinationType, MappingOperationOptions options)
     : this(typeMap, source, null, sourceType, destinationType, options)
 {
 }