Open cytoph opened 2 years ago
It would be great if something like this would be possible:
config.NewConfig<DataRow, FormatDescriptor>() .Map(f => f.DateFormat, dr => dr.Field<string>("DateFormat")) // [...] .Map(f => f.DecimalDigits[DecimalType.None], dr => dr.Field<bool>("DigitsNone")) .Map(f => f.DecimalDigits[DecimalType.Rate], dr => dr.Field<bool>("DigitsRate")) .Map(f => f.DecimalDigits[DecimalType.Sum], dr => dr.Field<bool>("DigitsSum")) // [...] ;
Currently my only workaround for this is the following (which is kind of ugly):
config.NewConfig<DataRow, FormatDescriptor>() .Map(f => f.DateFormat, dr => dr.Field<string>("DateFormat")) // [...] .AfterMapping((dr, f) => { f.DecimalDigits[DecimalType.None] = dr.Field<bool>("DigitsNone"); f.DecimalDigits[DecimalType.Rate] = dr.Field<bool>("DigitsRate"); f.DecimalDigits[DecimalType.Sum] = dr.Field<bool>("DigitsSum"); // [...] };
Is something like this already possible in any way? If no, it would really be nice, to have that functionality.
It would be great if something like this would be possible:
Currently my only workaround for this is the following (which is kind of ugly):
Is something like this already possible in any way? If no, it would really be nice, to have that functionality.