|
|
|
@ -12,12 +12,15 @@ public class AbpNotificationsApplicationAutoMapperProfile : Profile |
|
|
|
.ForMember(dto => dto.Lifetime, map => map.Ignore()) |
|
|
|
.ForMember(dto => dto.Data, map => map.MapFrom((src, nfi) => |
|
|
|
{ |
|
|
|
var dataType = Type.GetType(src.NotificationTypeName); |
|
|
|
var data = Activator.CreateInstance(dataType); |
|
|
|
if (data is NotificationData notificationData) |
|
|
|
if (src != null) |
|
|
|
{ |
|
|
|
notificationData.ExtraProperties = src.ExtraProperties; |
|
|
|
return notificationData; |
|
|
|
var dataType = Type.GetType(src.NotificationTypeName); |
|
|
|
var data = Activator.CreateInstance(dataType); |
|
|
|
if (data is NotificationData notificationData) |
|
|
|
{ |
|
|
|
notificationData.ExtraProperties = src.ExtraProperties; |
|
|
|
return notificationData; |
|
|
|
} |
|
|
|
} |
|
|
|
return new NotificationData(); |
|
|
|
})); |
|
|
|
|