Browse Source

fix(object-mapper): Fix the invalid object mapping

pull/1416/head
colin 2 months ago
parent
commit
5a72dd5b45
  1. 6
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs
  2. 6
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/EntityChangeStore.cs
  3. 5
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs
  4. 6
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs
  5. 8
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs
  6. 6
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs
  7. 9
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/NotificationStore.cs
  8. 6
      aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobStore.cs

6
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AuditLogManager.cs

@ -17,7 +17,7 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
public class AuditLogManager : IAuditLogManager, ITransientDependency public class AuditLogManager : IAuditLogManager, ITransientDependency
{ {
protected IObjectMapper ObjectMapper { get; } protected IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> ObjectMapper { get; }
protected IAuditLogRepository AuditLogRepository { get; } protected IAuditLogRepository AuditLogRepository { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; } protected IUnitOfWorkManager UnitOfWorkManager { get; }
protected AbpAuditingOptions Options { get; } protected AbpAuditingOptions Options { get; }
@ -26,11 +26,11 @@ public class AuditLogManager : IAuditLogManager, ITransientDependency
public ILogger<AuditLogManager> Logger { protected get; set; } public ILogger<AuditLogManager> Logger { protected get; set; }
public AuditLogManager( public AuditLogManager(
IObjectMapper objectMapper,
IAuditLogRepository auditLogRepository, IAuditLogRepository auditLogRepository,
IUnitOfWorkManager unitOfWorkManager, IUnitOfWorkManager unitOfWorkManager,
IOptions<AbpAuditingOptions> options, IOptions<AbpAuditingOptions> options,
IAuditLogInfoToAuditLogConverter converter) IAuditLogInfoToAuditLogConverter converter,
IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> objectMapper)
{ {
ObjectMapper = objectMapper; ObjectMapper = objectMapper;
AuditLogRepository = auditLogRepository; AuditLogRepository = auditLogRepository;

6
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/EntityChangeStore.cs

@ -14,14 +14,14 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
public class EntityChangeStore : IEntityChangeStore, ITransientDependency public class EntityChangeStore : IEntityChangeStore, ITransientDependency
{ {
protected IObjectMapper ObjectMapper { get; } protected IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> ObjectMapper { get; }
protected IAuditLogRepository AuditLogRepository { get; } protected IAuditLogRepository AuditLogRepository { get; }
public ILogger<EntityChangeStore> Logger { protected get; set; } public ILogger<EntityChangeStore> Logger { protected get; set; }
public EntityChangeStore( public EntityChangeStore(
IObjectMapper objectMapper, IAuditLogRepository auditLogRepository,
IAuditLogRepository auditLogRepository) IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> objectMapper)
{ {
ObjectMapper = objectMapper; ObjectMapper = objectMapper;
AuditLogRepository = auditLogRepository; AuditLogRepository = auditLogRepository;

5
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/SecurityLogManager.cs

@ -17,15 +17,14 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
public class SecurityLogManager : ISecurityLogManager, ITransientDependency public class SecurityLogManager : ISecurityLogManager, ITransientDependency
{ {
public ILogger<SecurityLogManager> Logger { get; set; } public ILogger<SecurityLogManager> Logger { get; set; }
protected IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> ObjectMapper { get; }
protected IObjectMapper ObjectMapper { get; }
protected AbpSecurityLogOptions SecurityLogOptions { get; } protected AbpSecurityLogOptions SecurityLogOptions { get; }
protected IIdentitySecurityLogRepository IdentitySecurityLogRepository { get; } protected IIdentitySecurityLogRepository IdentitySecurityLogRepository { get; }
protected IGuidGenerator GuidGenerator { get; } protected IGuidGenerator GuidGenerator { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; } protected IUnitOfWorkManager UnitOfWorkManager { get; }
public SecurityLogManager( public SecurityLogManager(
IObjectMapper objectMapper, IObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule> objectMapper,
ILogger<SecurityLogManager> logger, ILogger<SecurityLogManager> logger,
IOptions<AbpSecurityLogOptions> securityLogOptions, IOptions<AbpSecurityLogOptions> securityLogOptions,
IIdentitySecurityLogRepository identitySecurityLogRepository, IIdentitySecurityLogRepository identitySecurityLogRepository,

6
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/SerilogElasticsearchLoggingManager.cs

@ -26,19 +26,19 @@ public class SerilogElasticsearchLoggingManager : ILoggingManager, ISingletonDep
private readonly static Regex IndexFormatRegex = new Regex(@"^(.*)(?:\{0\:.+\})(.*)$"); private readonly static Regex IndexFormatRegex = new Regex(@"^(.*)(?:\{0\:.+\})(.*)$");
private readonly IClock _clock; private readonly IClock _clock;
private readonly IObjectMapper _objectMapper;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly AbpLoggingSerilogElasticsearchOptions _options; private readonly AbpLoggingSerilogElasticsearchOptions _options;
private readonly IElasticsearchClientFactory _clientFactory; private readonly IElasticsearchClientFactory _clientFactory;
private readonly IObjectMapper<AbpLoggingSerilogElasticsearchModule> _objectMapper;
public ILogger<SerilogElasticsearchLoggingManager> Logger { protected get; set; } public ILogger<SerilogElasticsearchLoggingManager> Logger { protected get; set; }
public SerilogElasticsearchLoggingManager( public SerilogElasticsearchLoggingManager(
IClock clock, IClock clock,
IObjectMapper objectMapper,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
IOptions<AbpLoggingSerilogElasticsearchOptions> options, IOptions<AbpLoggingSerilogElasticsearchOptions> options,
IElasticsearchClientFactory clientFactory) IElasticsearchClientFactory clientFactory,
IObjectMapper<AbpLoggingSerilogElasticsearchModule> objectMapper)
{ {
_clock = clock; _clock = clock;
_objectMapper = objectMapper; _objectMapper = objectMapper;

8
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Chat/MessageStore.cs

@ -18,8 +18,6 @@ public class MessageStore : IMessageStore, ITransientDependency
{ {
private readonly IFriendStore _friendStore; private readonly IFriendStore _friendStore;
private readonly IObjectMapper _objectMapper;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IUnitOfWorkManager _unitOfWorkManager;
@ -29,14 +27,16 @@ public class MessageStore : IMessageStore, ITransientDependency
private readonly IMessageRepository _messageRepository; private readonly IMessageRepository _messageRepository;
private readonly IUserChatSettingRepository _userChatSettingRepository; private readonly IUserChatSettingRepository _userChatSettingRepository;
private readonly IObjectMapper<AbpMessageServiceDomainModule> _objectMapper;
public MessageStore( public MessageStore(
IFriendStore friendStore, IFriendStore friendStore,
IObjectMapper objectMapper,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager, IUnitOfWorkManager unitOfWorkManager,
IGroupRepository groupRepository, IGroupRepository groupRepository,
IMessageRepository messageRepository, IMessageRepository messageRepository,
IUserChatSettingRepository userChatSettingRepository) IUserChatSettingRepository userChatSettingRepository,
IObjectMapper<AbpMessageServiceDomainModule> objectMapper)
{ {
_friendStore = friendStore; _friendStore = friendStore;
_objectMapper = objectMapper; _objectMapper = objectMapper;

6
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Groups/GroupStore.cs

@ -11,14 +11,14 @@ namespace LINGYUN.Abp.MessageService.Groups;
public class GroupStore : IGroupStore, ITransientDependency public class GroupStore : IGroupStore, ITransientDependency
{ {
private readonly IObjectMapper _objectMapper;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly IGroupRepository _groupRepository; private readonly IGroupRepository _groupRepository;
private readonly IObjectMapper<AbpMessageServiceDomainModule> _objectMapper;
public GroupStore( public GroupStore(
IObjectMapper objectMapper,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
IGroupRepository groupRepository) IGroupRepository groupRepository,
IObjectMapper<AbpMessageServiceDomainModule> objectMapper)
{ {
_objectMapper = objectMapper; _objectMapper = objectMapper;
_currentTenant = currentTenant; _currentTenant = currentTenant;

9
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/NotificationStore.cs

@ -19,8 +19,6 @@ public class NotificationStore : INotificationStore
{ {
private readonly IClock _clock; private readonly IClock _clock;
private readonly IObjectMapper _objectMapper;
private readonly ICurrentTenant _currentTenant; private readonly ICurrentTenant _currentTenant;
private readonly IUnitOfWorkManager _unitOfWorkManager; private readonly IUnitOfWorkManager _unitOfWorkManager;
@ -33,16 +31,17 @@ public class NotificationStore : INotificationStore
private readonly AbpNotificationsPublishOptions _options; private readonly AbpNotificationsPublishOptions _options;
private readonly IObjectMapper<AbpNotificationsDomainModule> _objectMapper;
public NotificationStore( public NotificationStore(
IClock clock, IClock clock,
IObjectMapper objectMapper,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager, IUnitOfWorkManager unitOfWorkManager,
INotificationRepository notificationRepository, INotificationRepository notificationRepository,
IUserSubscribeRepository userSubscribeRepository, IUserSubscribeRepository userSubscribeRepository,
IUserNotificationRepository userNotificationRepository, IUserNotificationRepository userNotificationRepository,
IOptions<AbpNotificationsPublishOptions> options IOptions<AbpNotificationsPublishOptions> options,
) IObjectMapper<AbpNotificationsDomainModule> objectMapper)
{ {
_clock = clock; _clock = clock;
_objectMapper = objectMapper; _objectMapper = objectMapper;

6
aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Domain/LINGYUN/Abp/TaskManagement/BackgroundJobStore.cs

@ -14,18 +14,18 @@ namespace LINGYUN.Abp.TaskManagement;
[Dependency(ReplaceServices = true)] [Dependency(ReplaceServices = true)]
public class BackgroundJobStore : IJobStore, ITransientDependency public class BackgroundJobStore : IJobStore, ITransientDependency
{ {
protected IObjectMapper ObjectMapper { get; }
protected ICurrentTenant CurrentTenant { get; } protected ICurrentTenant CurrentTenant { get; }
protected IUnitOfWorkManager UnitOfWorkManager { get; } protected IUnitOfWorkManager UnitOfWorkManager { get; }
protected IBackgroundJobInfoRepository JobInfoRepository { get; } protected IBackgroundJobInfoRepository JobInfoRepository { get; }
protected IBackgroundJobLogRepository JobLogRepository { get; } protected IBackgroundJobLogRepository JobLogRepository { get; }
protected IObjectMapper<TaskManagementDomainModule> ObjectMapper { get; }
public BackgroundJobStore( public BackgroundJobStore(
IObjectMapper objectMapper,
ICurrentTenant currentTenant, ICurrentTenant currentTenant,
IUnitOfWorkManager unitOfWorkManager, IUnitOfWorkManager unitOfWorkManager,
IBackgroundJobInfoRepository jobInfoRepository, IBackgroundJobInfoRepository jobInfoRepository,
IBackgroundJobLogRepository jobLogRepository) IBackgroundJobLogRepository jobLogRepository,
IObjectMapper<TaskManagementDomainModule> objectMapper)
{ {
ObjectMapper = objectMapper; ObjectMapper = objectMapper;
CurrentTenant = currentTenant; CurrentTenant = currentTenant;

Loading…
Cancel
Save