You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a static mapper that is used in many other mappers. I don't want to add the UseStaticMapper attribute to each mapper class.
Describe the solution you'd like UseStaticMapper should be allowed as an assembly attribute and should apply to all mappers in the assembly.
Describe alternatives you've considered
A new optional property UseAsStaticMapper (or similar) on the Mapper attribute that enables the usage of this mapper as a static mapper in all other mappers.
The text was updated successfully, but these errors were encountered:
I like the idea, I'm not sure though if we should just add a list of types to the MapperDefaultsAttribute to enforce having all the assembly-wide configuration at one place. WDYT?
That would also be a possibility. But with more than a few mappers you'd then have to wrap the code line. I think such long/wrapped attributes are ugly, but that's my personal opinion. If you want to do it that way then I'll accept it 😄
I thought more about it and I think the best solution would be to allow the UseStaticMapper to be applied to the assembly. The System.Text.Json apis treat a similar case the same way.
Would be happy to accept a PR.
The reading of the attributes should happen similarly to the assembly defaults.
Is your feature request related to a problem? Please describe.
I have a static mapper that is used in many other mappers. I don't want to add the
UseStaticMapper
attribute to each mapper class.Describe the solution you'd like
UseStaticMapper
should be allowed as an assembly attribute and should apply to all mappers in the assembly.Describe alternatives you've considered
A new optional property
UseAsStaticMapper
(or similar) on theMapper
attribute that enables the usage of this mapper as a static mapper in all other mappers.The text was updated successfully, but these errors were encountered: