fluentsprings / ExpressMapper

Mapping .Net types
http://www.expressmapper.org
Other
310 stars 65 forks source link

Source type as interface should be possible #95

Open wedge76 opened 8 years ago

wedge76 commented 8 years ago

I'm using lots of member configurations where the registered source type is an interface.

After I switched ExpressMapper from version 1.0.3 to 1.8.1 Compile method crashes with message "Cannot create an instance of an interface." which origins in class MappingServiceBase line 58 dynamic srcInst = Activator.CreateInstance(src);

May you change the code accordingly, that interfaces as source type will be possible again? Many thanks in advance.

wedge76 commented 8 years ago

Dear @anisimovyuriy

I'm very fond of the ExpressMapper and am extensively using it. Actually most of my mappings are configured with interfaces as source as I'm using a former version. Do you see any problem of supporting my request?

Kind regards wedge

anisimovyuriy commented 8 years ago

I'll try my best to get it done ASAP. Thanks!