private BaseParams MapParams(BaseParams transactionParams) { var mapped = transactionParams.Clone(); foreach (PropertyInfo propertyInfo in transactionParams.GetPropertiesToExport()) { var attribute = propertyInfo.GetCustomAttribute <ExportableAttribute>(); if (attribute?.ExportValueMap != null) { var mappedValue = GetDisplayedValue(propertyInfo.GetValue(mapped) as string, attribute.ExportValueMap); propertyInfo.SetValue(mapped, mappedValue); } } return(mapped); }