I have a set of classes I would like to map to with Automapper. However, every class has a constructor parameter. This parameter is of the same type for all members, but I do not know the value to supply until the point I want to do my mapping.
I have found the ConstructUsing method, but that requires me to specify the parameter value at time of configuration. I would prefer to do it at time of Mapping to avoid needing to create a separate MappingEngine for every instance of the parameter. I have found the Map overload that maps to an already created destination object. This is helpful, but it does not work for lists or object graphs.
Essentially, I am looking for something like this resolve method from Autofac, only applied to Automapper's Map method.
Resolve<IFoo>( new TypedParameter( typeof( IService ), m_service) );