Browse Source

feat(mapper): Use `Mapperly` instead of `AutoMapper`

pull/1416/head
colin 4 weeks ago
parent
commit
153fd0d488
  1. 5
      Directory.Packages.props
  2. 11
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs
  3. 58
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingEfCoreMappers.cs
  4. 23
      aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs
  5. 2
      aspnet-core/framework/dapr/LINGYUN.Abp.DistributedLocking.Dapr/LINGYUN/Abp/DistributedLocking/Dapr/DaprAbpDistributedLockHandle.cs
  6. 20
      aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeApplicationMapper.cs
  7. 11
      aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeApplicationModule.cs
  8. 13
      aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeMapperProfile.cs
  9. 29
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMapperProfile.cs
  10. 53
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs
  11. 11
      aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs
  12. 5
      aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/LY.MicroService.Applications.Single.DbMigrator.csproj
  13. 1
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj
  14. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsEntityFrameworkCoreMySqlModule.cs
  15. 2
      aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsDbContext.cs
  16. 13
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountApplicationMapper.cs
  17. 8
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountApplicationModule.cs
  18. 12
      aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountMapperProfile.cs
  19. 1
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web.IdentityServer/LINGYUN.Abp.Account.Web.IdentityServer.csproj
  20. 7
      aspnet-core/modules/account/LINGYUN.Abp.Account.Web/AbpAccountWebModule.cs
  21. 2
      aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN.Abp.Auditing.Application.csproj
  22. 77
      aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingApplicationMappers.cs
  23. 11
      aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingApplicationModule.cs
  24. 31
      aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingMapperProfile.cs
  25. 8
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/AbpDemoApplicationModule.cs
  26. 26
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMapperProfile.cs
  27. 30
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMappers.cs
  28. 2
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN.Abp.Demo.Domain.csproj
  29. 11
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/AbpDemoDomainModule.cs
  30. 10
      aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDomainMapperProfile.cs
  31. 1
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql.csproj
  32. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/PersistenceStartup.cs
  33. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/WebhooksStartup.cs
  34. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/WorkflowSettingsStartup.cs
  35. 2
      aspnet-core/modules/elsa/LINGYUN.Abp.Elsa/LINGYUN.Abp.Elsa.csproj
  36. 8
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/AbpGdprApplicationModule.cs
  37. 10
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/GdprApplicationMapperProfile.cs
  38. 11
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/GdprApplicationMappers.cs
  39. 2
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN.Abp.Gdpr.Domain.csproj
  40. 11
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN/Abp/Gdpr/AbpGdprDomainModule.cs
  41. 10
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN/Abp/Gdpr/GdprDomainMapperProfile.cs
  42. 8
      aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Web/AbpGdprWebModule.cs
  43. 59
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationMappers.cs
  44. 8
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationModule.cs
  45. 26
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs
  46. 8
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/AbpIdentityDomainModule.cs
  47. 12
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/IdentityDomainMappers.cs
  48. 12
      aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/IdentityDomainMappingProfile.cs
  49. 5
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiScopes/Dto/ApiScopePropertyDto.cs
  50. 173
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationMappers.cs
  51. 15
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationModule.cs
  52. 56
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs
  53. 1
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN.Abp.IdentityServer.Domain.csproj
  54. 1
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN.Abp.IdentityServer.LinkUser.csproj
  55. 1
      aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj
  56. 12
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementApplicationModule.cs
  57. 12
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LocalizationManagementApplicationMapperProfile.cs
  58. 18
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LocalizationManagementApplicationMappers.cs
  59. 2
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN.Abp.LocalizationManagement.Domain.csproj
  60. 11
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementDomainModule.cs
  61. 13
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationManagementDomainMapperProfile.cs
  62. 25
      aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationManagementDomainMappers.cs
  63. 4
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/RevocationIdentitySession.cs
  64. 4
      aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/UserinfoIdentitySession.cs
  65. 2
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN.Abp.OssManagement.Application.csproj
  66. 11
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/AbpOssManagementApplicationModule.cs
  67. 18
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssManagementApplicationAutoMapperProfile.cs
  68. 49
      aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssManagementApplicationMappers.cs
  69. 125
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappers.cs
  70. 39
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappingProfile.cs
  71. 8
      aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationModule.cs
  72. 2
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN.Platform.Domain.csproj
  73. 57
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappers.cs
  74. 24
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappingProfile.cs
  75. 12
      aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainModule.cs
  76. 3
      aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.EntityFrameworkCore/FodyWeavers.xml
  77. 30
      aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.EntityFrameworkCore/FodyWeavers.xsd
  78. 10
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/AbpMessageServiceApplicationAutoMapperProfile.cs
  79. 7
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/AbpMessageServiceApplicationModule.cs
  80. 2
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj
  81. 11
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/AbpMessageServiceDomainModule.cs
  82. 46
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Mapper/MessageServiceDomainAutoMapperProfile.cs
  83. 79
      aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/MessageServiceDomainMappers.cs
  84. 31
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs
  85. 35
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationMappers.cs
  86. 8
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationModule.cs
  87. 2
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN.Abp.Notifications.Domain.csproj
  88. 52
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs
  89. 76
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainMappers.cs
  90. 11
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainModule.cs
  91. 2
      aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/AbpNotificationsEntityFrameworkCoreModule.cs
  92. 33
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationAutoMapperProfile.cs
  93. 37
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationMappers.cs
  94. 7
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationModule.cs
  95. 2
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN.Abp.Saas.Domain.csproj
  96. 77
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainMappers.cs
  97. 58
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainMappingProfile.cs
  98. 11
      aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainModule.cs
  99. 2
      aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundWorkerAdapter.cs
  100. 13
      aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/TaskManagementApplicationMapperProfile.cs

5
Directory.Packages.props

@ -277,6 +277,11 @@
<PackageVersion Include="OpenTelemetry.Instrumentation.Runtime" Version="1.14.0" />
<PackageVersion Include="OpenTelemetry.Instrumentation.SqlClient" Version="1.14.0-beta.1" />
</ItemGroup>
<!-- Rebus-->
<ItemGroup>
<PackageVersion Include="Rebus.Microsoft.Extensions.Logging" Version="5.2.0" />
<PackageVersion Include="Rebus.ServiceProvider" Version="10.7.1" />
</ItemGroup>
<!-- Test -->
<ItemGroup>
<PackageVersion Include="coverlet.collector" Version="6.0.4" />

11
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditLoggingEntityFrameworkCoreModule.cs

@ -1,5 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
@ -9,16 +9,11 @@ namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
typeof(Volo.Abp.AuditLogging.EntityFrameworkCore.AbpAuditLoggingEntityFrameworkCoreModule))]
[DependsOn(
typeof(AbpAuditLoggingModule),
typeof(AbpAutoMapperModule))]
typeof(AbpMapperlyModule))]
public class AbpAuditLoggingEntityFrameworkCoreModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpAuditingMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpAuditLoggingEntityFrameworkCoreModule>();
}
}

58
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingEfCoreMappers.cs

@ -0,0 +1,58 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Identity;
using Volo.Abp.Mapperly;
using Volo.Abp.ObjectExtending;
using VoloAuditLog = Volo.Abp.AuditLogging.AuditLog;
using VoloAuditLogAction = Volo.Abp.AuditLogging.AuditLogAction;
using VoloEntityChange = Volo.Abp.AuditLogging.EntityChange;
using VoloEntityChangeWithUsername = Volo.Abp.AuditLogging.EntityChangeWithUsername;
using VoloEntityPropertyChange = Volo.Abp.AuditLogging.EntityPropertyChange;
namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class VoloAuditLogActionToAuditLogActionMapper : MapperBase<VoloAuditLogAction, AuditLogAction>
{
public override partial AuditLogAction Map(VoloAuditLogAction source);
public override partial void Map(VoloAuditLogAction source, AuditLogAction destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class VoloEntityPropertyChangeToEntityPropertyChangeMapper : MapperBase<VoloEntityPropertyChange, EntityPropertyChange>
{
public override partial EntityPropertyChange Map(VoloEntityPropertyChange source);
public override partial void Map(VoloEntityPropertyChange source, EntityPropertyChange destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class VoloEntityChangeToEntityChangeMapper : MapperBase<VoloEntityChange, EntityChange>
{
public override partial EntityChange Map(VoloEntityChange source);
public override partial void Map(VoloEntityChange source, EntityChange destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class VoloAuditLogToAuditLogMapper : MapperBase<VoloAuditLog, AuditLog>
{
public override partial AuditLog Map(VoloAuditLog source);
public override partial void Map(VoloAuditLog source, AuditLog destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class VoloEntityChangeWithUsernameToEntityChangeWithUsernameMapper : MapperBase<VoloEntityChangeWithUsername, EntityChangeWithUsername>
{
public override partial EntityChangeWithUsername Map(VoloEntityChangeWithUsername source);
public override partial void Map(VoloEntityChangeWithUsername source, EntityChangeWithUsername destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class IdentitySecurityLogToSecurityLogMapper : MapperBase<IdentitySecurityLog, SecurityLog>
{
public override partial SecurityLog Map(IdentitySecurityLog source);
public override partial void Map(IdentitySecurityLog source, SecurityLog destination);
}

23
aspnet-core/framework/auditing/LINGYUN.Abp.AuditLogging.EntityFrameworkCore/LINGYUN/Abp/AuditLogging/EntityFrameworkCore/AbpAuditingMapperProfile.cs

@ -1,23 +0,0 @@
using AutoMapper;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.AuditLogging.EntityFrameworkCore;
public class AbpAuditingMapperProfile : Profile
{
public AbpAuditingMapperProfile()
{
CreateMap<Volo.Abp.AuditLogging.AuditLogAction, LINGYUN.Abp.AuditLogging.AuditLogAction>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<Volo.Abp.AuditLogging.EntityPropertyChange, LINGYUN.Abp.AuditLogging.EntityPropertyChange>();
CreateMap<Volo.Abp.AuditLogging.EntityChange, LINGYUN.Abp.AuditLogging.EntityChange>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<Volo.Abp.AuditLogging.AuditLog, LINGYUN.Abp.AuditLogging.AuditLog>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<Volo.Abp.AuditLogging.EntityChangeWithUsername, LINGYUN.Abp.AuditLogging.EntityChangeWithUsername>();
CreateMap<Volo.Abp.Identity.IdentitySecurityLog, LINGYUN.Abp.AuditLogging.SecurityLog>(MemberList.Destination)
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
}
}

2
aspnet-core/framework/dapr/LINGYUN.Abp.DistributedLocking.Dapr/LINGYUN/Abp/DistributedLocking/Dapr/DaprAbpDistributedLockHandle.cs

@ -23,6 +23,8 @@ public class DaprAbpDistributedLockHandle : IAbpDistributedLockHandle
}
public async ValueTask DisposeAsync()
{
#pragma warning disable DAPR_DISTRIBUTEDLOCK
await DaprClient.Unlock(StoreName, ResourceId, LockOwner);
#pragma warning restore DAPR_DISTRIBUTEDLOCK
}
}

20
aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeApplicationMapper.cs

@ -0,0 +1,20 @@
using LINGYUN.Abp.AuditLogging;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.EntityChange;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EntityPropertyChangeToEntityPropertyChangeDtoMapper : MapperBase<EntityPropertyChange, EntityPropertyChangeDto>
{
public override partial EntityPropertyChangeDto Map(EntityPropertyChange source);
public override partial void Map(EntityPropertyChange source, EntityPropertyChangeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class EntityChangeToEntityChangeDtoMapper : MapperBase<AuditLogging.EntityChange, EntityChangeDto>
{
public override partial EntityChangeDto Map(AuditLogging.EntityChange source);
public override partial void Map(AuditLogging.EntityChange source, EntityChangeDto destination);
}

11
aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeApplicationModule.cs

@ -1,6 +1,6 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.EntityChange;
@ -8,16 +8,11 @@ namespace LINGYUN.Abp.EntityChange;
[DependsOn(
typeof(AbpEntityChangeApplicationContractsModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule))]
typeof(AbpMapperlyModule))]
public class AbpEntityChangeApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpEntityChangeApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpEntityChangeMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpEntityChangeApplicationModule>();
}
}

13
aspnet-core/framework/entity-change/LINGYUN.Abp.EntityChange.Application/LINGYUN/Abp/EntityChange/AbpEntityChangeMapperProfile.cs

@ -1,13 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.AuditLogging;
namespace LINGYUN.Abp.EntityChange;
public class AbpEntityChangeMapperProfile : Profile
{
public AbpEntityChangeMapperProfile()
{
CreateMap<EntityPropertyChange, EntityPropertyChangeDto>();
CreateMap<AuditLogging.EntityChange, EntityChangeDto>()
.MapExtraProperties();
}
}

29
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMapperProfile.cs

@ -1,29 +0,0 @@
using AutoMapper;
using Serilog.Events;
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch;
public class AbpLoggingSerilogElasticsearchMapperProfile : Profile
{
public AbpLoggingSerilogElasticsearchMapperProfile()
{
CreateMap<SerilogException, LogException>();
CreateMap<SerilogField, LogField>()
.ForMember(log => log.Id, map => map.MapFrom(slog => slog.UniqueId.ToString()));
CreateMap<SerilogInfo, LogInfo>()
.ForMember(log => log.Level, map => map.MapFrom(slog => GetLogLevel(slog.Level)));
}
private static Microsoft.Extensions.Logging.LogLevel GetLogLevel(LogEventLevel logEventLevel)
{
return logEventLevel switch
{
LogEventLevel.Fatal => Microsoft.Extensions.Logging.LogLevel.Critical,
LogEventLevel.Error => Microsoft.Extensions.Logging.LogLevel.Error,
LogEventLevel.Warning => Microsoft.Extensions.Logging.LogLevel.Warning,
LogEventLevel.Information => Microsoft.Extensions.Logging.LogLevel.Information,
LogEventLevel.Debug => Microsoft.Extensions.Logging.LogLevel.Debug,
_ => Microsoft.Extensions.Logging.LogLevel.Trace,
};
}
}

53
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchMappers.cs

@ -0,0 +1,53 @@
using LINGYUN.Abp.Logging;
using LINGYUN.Abp.Logging.Serilog.Elasticsearch;
using Riok.Mapperly.Abstractions;
using Serilog.Events;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.AuditLogging.Serilog.Elasticsearch;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SerilogExceptionToLogExceptionMapper : MapperBase<SerilogException, LogException>
{
public override partial LogException Map(SerilogException source);
public override partial void Map(SerilogException source, LogException destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SerilogFieldToLogFieldMapper : MapperBase<SerilogField, LogField>
{
[MapperIgnoreTarget(nameof(LogField.Id))]
public override partial LogField Map(SerilogField source);
[MapperIgnoreTarget(nameof(LogField.Id))]
public override partial void Map(SerilogField source, LogField destination);
public override void AfterMap(SerilogField source, LogField destination)
{
destination.Id = source.UniqueId.ToString();
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SerilogInfoToLogInfoMapper : MapperBase<SerilogInfo, LogInfo>
{
[MapPropertyFromSource(nameof(LogInfo.Level), Use = nameof(GetLogLevel))]
public override partial LogInfo Map(SerilogInfo source);
[MapPropertyFromSource(nameof(LogInfo.Level), Use = nameof(GetLogLevel))]
public override partial void Map(SerilogInfo source, LogInfo destination);
[UserMapping(Default = false)]
private static Microsoft.Extensions.Logging.LogLevel GetLogLevel(SerilogInfo source)
{
return source.Level switch
{
LogEventLevel.Fatal => Microsoft.Extensions.Logging.LogLevel.Critical,
LogEventLevel.Error => Microsoft.Extensions.Logging.LogLevel.Error,
LogEventLevel.Warning => Microsoft.Extensions.Logging.LogLevel.Warning,
LogEventLevel.Information => Microsoft.Extensions.Logging.LogLevel.Information,
LogEventLevel.Debug => Microsoft.Extensions.Logging.LogLevel.Debug,
_ => Microsoft.Extensions.Logging.LogLevel.Trace,
};
}
}

11
aspnet-core/framework/logging/LINGYUN.Abp.Logging.Serilog.Elasticsearch/LINGYUN/Abp/AuditLogging/Serilog/Elasticsearch/AbpLoggingSerilogElasticsearchModule.cs

@ -1,7 +1,7 @@
using LINGYUN.Abp.Elasticsearch;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Json;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch;
@ -9,7 +9,7 @@ namespace LINGYUN.Abp.Logging.Serilog.Elasticsearch;
[DependsOn(
typeof(AbpLoggingModule),
typeof(AbpElasticsearchModule),
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpJsonModule))]
public class AbpLoggingSerilogElasticsearchModule : AbpModule
{
@ -19,11 +19,6 @@ public class AbpLoggingSerilogElasticsearchModule : AbpModule
Configure<AbpLoggingSerilogElasticsearchOptions>(configuration.GetSection("Logging:Serilog:Elasticsearch"));
context.Services.AddAutoMapperObjectMapper<AbpLoggingSerilogElasticsearchModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpLoggingSerilogElasticsearchMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpLoggingSerilogElasticsearchModule>();
}
}

5
aspnet-core/migrations/LY.MicroService.Applications.Single.DbMigrator/LY.MicroService.Applications.Single.DbMigrator.csproj

@ -13,11 +13,6 @@
<PackageReference Include="Serilog.Extensions.Logging" />
<PackageReference Include="Serilog.Sinks.File" />
<PackageReference Include="Serilog.Sinks.Console" />
<PackageReference Include="Microsoft.Extensions.Hosting" VersionOverride="9.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Volo.Abp.Autofac" />
</ItemGroup>

1
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql.csproj

@ -12,6 +12,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL.Pomelo" />
<PackageReference Include="DotNetCore.CAP.MySql" />
</ItemGroup>

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore.MySql/SingleMigrationsEntityFrameworkCoreMySqlModule.cs

@ -53,7 +53,9 @@ public class SingleMigrationsEntityFrameworkCoreMySqlModule : AbpModule
mysql =>
{
// see: https://github.com/PomeloFoundation/Pomelo.EntityFrameworkCore.MySql/issues/1960
#pragma warning disable CS0618
mysql.TranslateParameterizedCollectionsToConstants();
#pragma warning restore CS0618
mysql.MigrationsAssembly(GetType().Assembly);
});
});

2
aspnet-core/migrations/LY.MicroService.Applications.Single.EntityFrameworkCore/SingleMigrationsDbContext.cs

@ -155,6 +155,8 @@ public class SingleMigrationsDbContext :
public DbSet<BackgroundJobAction> BackgroundJobAction { get; set; }
public DbSet<BackgroundJobLog> BackgroundJobLogs { get; set; }
public DbSet<WebhookSendRecord> WebhookSendRecord { get; set; }
public DbSet<WebhookGroupDefinitionRecord> WebhookGroupDefinitionRecords { get; set; }

13
aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountApplicationMapper.cs

@ -0,0 +1,13 @@
using LINGYUN.Abp.AuditLogging;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Account;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SecurityLogToSecurityLogDtoMapper : MapperBase<SecurityLog, SecurityLogDto>
{
public override partial SecurityLogDto Map(SecurityLog source);
public override partial void Map(SecurityLog source, SecurityLogDto destination);
}

8
aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountApplicationModule.cs

@ -4,7 +4,6 @@ using LINGYUN.Abp.Identity;
using LINGYUN.Abp.WeChat.MiniProgram;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Account.Localization;
using Volo.Abp.AutoMapper;
using Volo.Abp.BlobStoring;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
@ -24,12 +23,7 @@ public class AbpAccountApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpAccountApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AbpAccountApplicationModule>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpAccountApplicationModule>();
Configure<AbpVirtualFileSystemOptions>(options =>
{

12
aspnet-core/modules/account/LINGYUN.Abp.Account.Application/LINGYUN/Abp/Account/AbpAccountMapperProfile.cs

@ -1,12 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.AuditLogging;
namespace LINGYUN.Abp.Account;
public class AbpAccountMapperProfile : Profile
{
public AbpAccountMapperProfile()
{
CreateMap<SecurityLog, SecurityLogDto>(MemberList.Destination);
}
}

1
aspnet-core/modules/account/LINGYUN.Abp.Account.Web.IdentityServer/LINGYUN.Abp.Account.Web.IdentityServer.csproj

@ -16,6 +16,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Volo.Abp.Account.Web.IdentityServer" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" />
</ItemGroup>

7
aspnet-core/modules/account/LINGYUN.Abp.Account.Web/AbpAccountWebModule.cs

@ -14,7 +14,6 @@ using Volo.Abp.Account.Web.ProfileManagement;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.QRCode;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
using Volo.Abp.Sms;
using Volo.Abp.VirtualFileSystem;
@ -53,11 +52,7 @@ public class AbpAccountWebModule : AbpModule
ConfigureProfileManagementPage();
context.Services.AddAutoMapperObjectMapper<AbpAccountWebModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AbpAccountWebModule>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpAccountWebModule>();
context.Services
.AddAuthentication()

2
aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN.Abp.Auditing.Application.csproj

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Ddd.Application" />
</ItemGroup>

77
aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingApplicationMappers.cs

@ -0,0 +1,77 @@
using LINGYUN.Abp.Auditing.AuditLogs;
using LINGYUN.Abp.Auditing.Logging;
using LINGYUN.Abp.Auditing.SecurityLogs;
using LINGYUN.Abp.AuditLogging;
using LINGYUN.Abp.Logging;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.Auditing;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class AuditLogActionToAuditLogActionDtoMapper : MapperBase<AuditLogAction, AuditLogActionDto>
{
public override partial AuditLogActionDto Map(AuditLogAction source);
public override partial void Map(AuditLogAction source, AuditLogActionDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EntityPropertyChangeToEntityPropertyChangeDtoMapper : MapperBase<EntityPropertyChange, EntityPropertyChangeDto>
{
public override partial EntityPropertyChangeDto Map(EntityPropertyChange source);
public override partial void Map(EntityPropertyChange source, EntityPropertyChangeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EntityChangeWithUsernameToEntityChangeWithUsernameDtoMapper : MapperBase<EntityChangeWithUsername, EntityChangeWithUsernameDto>
{
public override partial EntityChangeWithUsernameDto Map(EntityChangeWithUsername source);
public override partial void Map(EntityChangeWithUsername source, EntityChangeWithUsernameDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class EntityChangeToEntityChangeDtoMapper : MapperBase<EntityChange, EntityChangeDto>
{
public override partial EntityChangeDto Map(EntityChange source);
public override partial void Map(EntityChange source, EntityChangeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class AuditLogToAuditLogDtoMapper : MapperBase<AuditLog, AuditLogDto>
{
public override partial AuditLogDto Map(AuditLog source);
public override partial void Map(AuditLog source, AuditLogDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class SecurityLogToSecurityLogDtoMapper : MapperBase<SecurityLog, SecurityLogDto>
{
public override partial SecurityLogDto Map(SecurityLog source);
public override partial void Map(SecurityLog source, SecurityLogDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LogFieldToLogFieldDtoMapper : MapperBase<LogField, LogFieldDto>
{
public override partial LogFieldDto Map(LogField source);
public override partial void Map(LogField source, LogFieldDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LogExceptionToLogExceptionDtoMapper : MapperBase<LogException, LogExceptionDto>
{
public override partial LogExceptionDto Map(LogException source);
public override partial void Map(LogException source, LogExceptionDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LogInfoToLogDtoMapper : MapperBase<LogInfo, LogDto>
{
public override partial LogDto Map(LogInfo source);
public override partial void Map(LogInfo source, LogDto destination);
}

11
aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingApplicationModule.cs

@ -1,13 +1,13 @@
using LINGYUN.Abp.AuditLogging;
using LINGYUN.Abp.Logging;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Auditing;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpLoggingModule),
typeof(AbpAuditLoggingModule),
typeof(AbpAuditingApplicationContractsModule))]
@ -15,11 +15,6 @@ public class AbpAuditingApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpAuditingApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpAuditingMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpAuditingApplicationModule>();
}
}

31
aspnet-core/modules/auditing/LINGYUN.Abp.Auditing.Application/LINGYUN/Abp/Auditing/AbpAuditingMapperProfile.cs

@ -1,31 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.Auditing.AuditLogs;
using LINGYUN.Abp.Auditing.Logging;
using LINGYUN.Abp.Auditing.SecurityLogs;
using LINGYUN.Abp.AuditLogging;
using LINGYUN.Abp.Logging;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.Auditing;
public class AbpAuditingMapperProfile : Profile
{
public AbpAuditingMapperProfile()
{
CreateMap<AuditLogAction, AuditLogActionDto>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<EntityPropertyChange, EntityPropertyChangeDto>();
CreateMap<EntityChangeWithUsername, EntityChangeWithUsernameDto>();
CreateMap<EntityChange, EntityChangeDto>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<AuditLog, AuditLogDto>()
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<SecurityLog, SecurityLogDto>(MemberList.Destination)
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
CreateMap<LogField, LogFieldDto>();
CreateMap<LogException, LogExceptionDto>();
CreateMap<LogInfo, LogDto>();
}
}

8
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/AbpDemoApplicationModule.cs

@ -2,7 +2,6 @@
using LINGYUN.Abp.Exporter;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
@ -17,11 +16,6 @@ public class AbpDemoApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpDemoApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DemoApplicationMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpDemoApplicationModule>();
}
}

26
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMapperProfile.cs

@ -1,26 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Volo.Abp.AutoMapper;
namespace LINGYUN.Abp.Demo;
public class DemoApplicationMapperProfile : Profile
{
public DemoApplicationMapperProfile()
{
CreateMap<Book, BookDto>()
.Ignore(dto => dto.AuthorName);
CreateMap<BookImportDto, Book>()
.IgnoreAuditedObjectProperties()
.Ignore(dto => dto.Id)
.Ignore(dto => dto.ExtraProperties)
.Ignore(dto => dto.ConcurrencyStamp);
CreateMap<UpdateBookDto, Book>()
.IgnoreAuditedObjectProperties()
.Ignore(dto => dto.Id)
.Ignore(dto => dto.ExtraProperties)
.Ignore(dto => dto.ConcurrencyStamp);
CreateMap<Author, AuthorDto>();
CreateMap<Author, AuthorLookupDto>();
}
}

30
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Application/LINGYUN/Abp/Demo/DemoApplicationMappers.cs

@ -0,0 +1,30 @@
using LINGYUN.Abp.Demo.Authors;
using LINGYUN.Abp.Demo.Books;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Demo;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class BookToBookDtoMapper : MapperBase<Book, BookDto>
{
[MapperIgnoreTarget(nameof(BookDto.AuthorName))]
public override partial BookDto Map(Book source);
[MapperIgnoreTarget(nameof(BookDto.AuthorName))]
public override partial void Map(Book source, BookDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class AuthorToAuthorDtoMapper : MapperBase<Author, AuthorDto>
{
public override partial AuthorDto Map(Author source);
public override partial void Map(Author source, AuthorDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class AuthorToAuthorLookupDtoMapper : MapperBase<Author, AuthorLookupDto>
{
public override partial AuthorLookupDto Map(Author source);
public override partial void Map(Author source, AuthorLookupDto destination);
}

2
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN.Abp.Demo.Domain.csproj

@ -16,7 +16,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
</ItemGroup>

11
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/AbpDemoDomainModule.cs

@ -3,15 +3,15 @@ using LINGYUN.Abp.DataProtection.Localization;
using LINGYUN.Abp.Demo.Books;
using LINGYUN.Abp.Demo.Localization;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain;
using Volo.Abp.Localization;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Demo;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpDddDomainModule),
typeof(AbpDataProtectionModule),
typeof(AbpDemoDomainSharedModule))]
@ -19,12 +19,7 @@ public class AbpDemoDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpDemoDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<DemoDomainMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpDemoDomainModule>();
Configure<AbpLocalizationOptions>(options =>
{

10
aspnet-core/modules/demo/LINGYUN.Abp.Demo.Domain/LINGYUN/Abp/Demo/DemoDomainMapperProfile.cs

@ -1,10 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.Demo;
public class DemoDomainMapperProfile : Profile
{
public DemoDomainMapperProfile()
{
}
}

1
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql.csproj

@ -22,6 +22,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" />
<PackageReference Include="Elsa.Webhooks.Persistence.EntityFramework.MySql" />
<PackageReference Include="Elsa.WorkflowSettings.Persistence.EntityFramework.MySql" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.MySQL.Pomelo" />

2
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/PersistenceStartup.cs

@ -11,9 +11,11 @@ public class PersistenceStartup : PersistenceStartupBase
protected override void Configure(DbContextOptionsBuilder options, string connectionString)
{
#pragma warning disable CS0618
options.UseMySql(
connectionString,
ServerVersion.AutoDetect(connectionString),
mysql => mysql.TranslateParameterizedCollectionsToConstants());
#pragma warning restore CS0618
}
}

2
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/WebhooksStartup.cs

@ -10,10 +10,12 @@ public class WebhooksStartup : WebhooksStartupBase
protected override void Configure(DbContextOptionsBuilder options, string connectionString)
{
#pragma warning disable CS0618
options.UseMySql(
connectionString,
ServerVersion.AutoDetect(connectionString),
mysql => mysql.MigrationsHistoryTable("__EFMigrationsHistory_Webhooks")
.TranslateParameterizedCollectionsToConstants());
#pragma warning restore CS0618
}
}

2
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa.EntityFrameworkCore.MySql/LINGYUN/Abp/Elsa/EntityFrameworkCore/MySql/WorkflowSettingsStartup.cs

@ -10,10 +10,12 @@ public class WorkflowSettingsStartup : WorkflowSettingsStartupBase
protected override void Configure(DbContextOptionsBuilder options, string connectionString)
{
#pragma warning disable CS0618
options.UseMySql(
connectionString,
ServerVersion.AutoDetect(connectionString),
mysql => mysql.MigrationsHistoryTable("__EFMigrationsHistory_WorkflowSettings")
.TranslateParameterizedCollectionsToConstants());
#pragma warning restore CS0618
}
}

2
aspnet-core/modules/elsa/LINGYUN.Abp.Elsa/LINGYUN.Abp.Elsa.csproj

@ -22,6 +22,8 @@
<PackageReference Include="Volo.Abp.Threading" />
<PackageReference Include="Volo.Abp.Json" />
<PackageReference Include="Elsa" />
<PackageReference Include="Rebus.Microsoft.Extensions.Logging" />
<PackageReference Include="Rebus.ServiceProvider" />
</ItemGroup>
</Project>

8
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/AbpGdprApplicationModule.cs

@ -1,7 +1,6 @@
using LINGYUN.Abp.Exporter;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Gdpr;
@ -16,11 +15,6 @@ public class AbpGdprApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpGdprApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AbpGdprApplicationModule>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpGdprApplicationModule>();
}
}

10
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/GdprApplicationMapperProfile.cs

@ -1,10 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.Gdpr;
public class GdprApplicationMapperProfile : Profile
{
public GdprApplicationMapperProfile()
{
CreateMap<GdprRequest, GdprRequestDto>();
}
}

11
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Application/LINGYUN/Abp/Gdpr/GdprApplicationMappers.cs

@ -0,0 +1,11 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Gdpr;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class GdprRequestToGdprRequestDtoMapper : MapperBase<GdprRequest, GdprRequestDto>
{
public override partial GdprRequestDto Map(GdprRequest source);
public override partial void Map(GdprRequest source, GdprRequestDto destination);
}

2
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN.Abp.Gdpr.Domain.csproj

@ -15,7 +15,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
</ItemGroup>

11
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN/Abp/Gdpr/AbpGdprDomainModule.cs

@ -1,12 +1,12 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Mapperly;
using Volo.Abp.Domain;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Gdpr;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpDddDomainModule),
typeof(AbpGdprDomainSharedModule)
)]
@ -19,11 +19,6 @@ public class AbpGdprDomainModule : AbpModule
Configure<AbpGdprOptions>(configuration.GetSection("Gdpr"));
Configure<AbpCookieConsentOptions>(configuration.GetSection("CookieConsent"));
context.Services.AddAutoMapperObjectMapper<AbpGdprDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AbpGdprDomainModule>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpGdprDomainModule>();
}
}

10
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Domain/LINGYUN/Abp/Gdpr/GdprDomainMapperProfile.cs

@ -1,10 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.Gdpr;
public class GdprDomainMapperProfile : Profile
{
public GdprDomainMapperProfile()
{
}
}

8
aspnet-core/modules/gdpr/LINGYUN.Abp.Gdpr.Web/AbpGdprWebModule.cs

@ -1,6 +1,5 @@
using LINGYUN.Abp.Gdpr.Localization;
using LINGYUN.Abp.Gdpr.Web.Pages.Account;
using LINGYUN.Abp.Gdpr.Web.Pages.Account.Components.ProfileManagementGroup.Gdpr;
using LINGYUN.Abp.Gdpr.Web.ProfileManagement;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Account.Web;
@ -8,7 +7,6 @@ using Volo.Abp.Account.Web.Pages.Account;
using Volo.Abp.Account.Web.ProfileManagement;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AutoMapper;
using Volo.Abp.Http.ProxyScripting.Generators.JQuery;
using Volo.Abp.Modularity;
using Volo.Abp.UI.Navigation;
@ -48,12 +46,6 @@ public class AbpGdprWebModule : AbpModule
ConfigureProfileManagementPage();
context.Services.AddAutoMapperObjectMapper<AbpGdprWebModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AbpGdprWebModule>(validate: true);
});
Configure<DynamicJavaScriptProxyOptions>(options =>
{
options.DisableModule(GdprRemoteServiceConsts.ModuleName);

59
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationMappers.cs

@ -0,0 +1,59 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Identity;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Identity;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class IdentityClaimTypeToIdentityClaimTypeDtoMapper: MapperBase<IdentityClaimType, IdentityClaimTypeDto>
{
public override partial IdentityClaimTypeDto Map(IdentityClaimType source);
public override partial void Map(IdentityClaimType source, IdentityClaimTypeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class IdentityUserClaimToIdentityClaimDtoMapper : MapperBase<IdentityUserClaim, IdentityClaimDto>
{
public override partial IdentityClaimDto Map(IdentityUserClaim source);
public override partial void Map(IdentityUserClaim source, IdentityClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class IdentityRoleClaimToIdentityClaimDtoMapper : MapperBase<IdentityRoleClaim, IdentityClaimDto>
{
public override partial IdentityClaimDto Map(IdentityRoleClaim source);
public override partial void Map(IdentityRoleClaim source, IdentityClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class IdentityUserToIdentityUserDtoMapper : MapperBase<IdentityUser, IdentityUserDto>
{
public override partial IdentityUserDto Map(IdentityUser source);
public override partial void Map(IdentityUser source, IdentityUserDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class IdentitySessionToIdentitySessionDtoMapper : MapperBase<IdentitySession, IdentitySessionDto>
{
public override partial IdentitySessionDto Map(IdentitySession source);
public override partial void Map(IdentitySession source, IdentitySessionDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class IdentityRoleToIdentityRoleDtoMapper : MapperBase<IdentityRole, IdentityRoleDto>
{
public override partial IdentityRoleDto Map(IdentityRole source);
public override partial void Map(IdentityRole source, IdentityRoleDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class OrganizationUnitToOrganizationUnitDtoMapper : MapperBase<OrganizationUnit, OrganizationUnitDto>
{
public override partial OrganizationUnitDto Map(OrganizationUnit source);
public override partial void Map(OrganizationUnit source, OrganizationUnitDto destination);
}

8
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationModule.cs

@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Identity;
@ -13,12 +12,7 @@ public class AbpIdentityApplicationModule : AbpModule
// private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpIdentityApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpIdentityApplicationModuleAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpIdentityApplicationModule>();
}
//public override void PostConfigureServices(ServiceConfigurationContext context)

26
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Application/LINGYUN/Abp/Identity/AbpIdentityApplicationModuleAutoMapperProfile.cs

@ -1,26 +0,0 @@
using AutoMapper;
using Volo.Abp.Identity;
namespace LINGYUN.Abp.Identity;
public class AbpIdentityApplicationModuleAutoMapperProfile : Profile
{
public AbpIdentityApplicationModuleAutoMapperProfile()
{
CreateMap<IdentityClaimType, IdentityClaimTypeDto>()
.MapExtraProperties();
CreateMap<IdentityUserClaim, IdentityClaimDto>();
CreateMap<IdentityRoleClaim, IdentityClaimDto>();
CreateMap<IdentityUser, IdentityUserDto>()
.MapExtraProperties();
CreateMap<IdentitySession, IdentitySessionDto>();
CreateMap<IdentityRole, IdentityRoleDto>()
.MapExtraProperties();
CreateMap<OrganizationUnit, OrganizationUnitDto>()
.MapExtraProperties();
}
}

8
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/AbpIdentityDomainModule.cs

@ -3,7 +3,6 @@ using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AutoMapper;
using Volo.Abp.BackgroundWorkers;
using Volo.Abp.DistributedLocking;
using Volo.Abp.Domain.Entities.Events.Distributed;
@ -21,12 +20,7 @@ public class AbpIdentityDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpIdentityDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<IdentityDomainMappingProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpIdentityDomainModule>();
Configure<AbpDistributedEntityEventOptions>(options =>
{

12
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/IdentityDomainMappers.cs

@ -0,0 +1,12 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Identity;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Identity;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class IdentitySessionToIdentitySessionEtoMapper : MapperBase<IdentitySession, IdentitySessionEto>
{
public override partial IdentitySessionEto Map(IdentitySession source);
public override partial void Map(IdentitySession source, IdentitySessionEto destination);
}

12
aspnet-core/modules/identity/LINGYUN.Abp.Identity.Domain/LINGYUN/Abp/Identity/IdentityDomainMappingProfile.cs

@ -1,12 +0,0 @@
using AutoMapper;
using Volo.Abp.Identity;
namespace LINGYUN.Abp.Identity;
public class IdentityDomainMappingProfile : Profile
{
public IdentityDomainMappingProfile()
{
CreateMap<IdentitySession, IdentitySessionEto>();
}
}

5
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application.Contracts/LINGYUN/Abp/IdentityServer/ApiScopes/Dto/ApiScopePropertyDto.cs

@ -1,9 +1,8 @@
using System;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Dtos;
namespace LINGYUN.Abp.IdentityServer.ApiScopes;
public class ApiScopePropertyDto : EntityDto<Guid>
public class ApiScopePropertyDto : EntityDto
{
public string Key { get; set; }

173
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationMappers.cs

@ -0,0 +1,173 @@
using LINGYUN.Abp.IdentityServer.ApiResources;
using LINGYUN.Abp.IdentityServer.ApiScopes;
using LINGYUN.Abp.IdentityServer.Clients;
using LINGYUN.Abp.IdentityServer.Grants;
using LINGYUN.Abp.IdentityServer.IdentityResources;
using Riok.Mapperly.Abstractions;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.ApiScopes;
using Volo.Abp.IdentityServer.Clients;
using Volo.Abp.IdentityServer.Grants;
using Volo.Abp.IdentityServer.IdentityResources;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.IdentityServer;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientSecretToClientSecretDtoMapper : MapperBase<ClientSecret, ClientSecretDto>
{
public override partial ClientSecretDto Map(ClientSecret source);
public override partial void Map(ClientSecret source, ClientSecretDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientScopeToClientScopeDtoMapper : MapperBase<ClientScope, ClientScopeDto>
{
public override partial ClientScopeDto Map(ClientScope source);
public override partial void Map(ClientScope source, ClientScopeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientGrantTypeToClientGrantTypeDtoMapper : MapperBase<ClientGrantType, ClientGrantTypeDto>
{
public override partial ClientGrantTypeDto Map(ClientGrantType source);
public override partial void Map(ClientGrantType source, ClientGrantTypeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientCorsOriginToClientCorsOriginDtoMapper : MapperBase<ClientCorsOrigin, ClientCorsOriginDto>
{
public override partial ClientCorsOriginDto Map(ClientCorsOrigin source);
public override partial void Map(ClientCorsOrigin source, ClientCorsOriginDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientRedirectUriToClientRedirectUriDtoMapper : MapperBase<ClientRedirectUri, ClientRedirectUriDto>
{
public override partial ClientRedirectUriDto Map(ClientRedirectUri source);
public override partial void Map(ClientRedirectUri source, ClientRedirectUriDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientPostLogoutRedirectUriToClientPostLogoutRedirectUriDtoMapper : MapperBase<ClientPostLogoutRedirectUri, ClientPostLogoutRedirectUriDto>
{
public override partial ClientPostLogoutRedirectUriDto Map(ClientPostLogoutRedirectUri source);
public override partial void Map(ClientPostLogoutRedirectUri source, ClientPostLogoutRedirectUriDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientIdPRestrictionToClientIdPRestrictionDtoMapper : MapperBase<ClientIdPRestriction, ClientIdPRestrictionDto>
{
public override partial ClientIdPRestrictionDto Map(ClientIdPRestriction source);
public override partial void Map(ClientIdPRestriction source, ClientIdPRestrictionDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientClaimToClientClaimDtoMapper : MapperBase<ClientClaim, ClientClaimDto>
{
public override partial ClientClaimDto Map(ClientClaim source);
public override partial void Map(ClientClaim source, ClientClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ClientPropertyToClientPropertyDtoMapper : MapperBase<ClientProperty, ClientPropertyDto>
{
public override partial ClientPropertyDto Map(ClientProperty source);
public override partial void Map(ClientProperty source, ClientPropertyDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class ClientToClientDtoMapper : MapperBase<Client, ClientDto>
{
public override partial ClientDto Map(Client source);
public override partial void Map(Client source, ClientDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiScopeClaimToApiScopeClaimDtoMapper : MapperBase<ApiScopeClaim, ApiScopeClaimDto>
{
public override partial ApiScopeClaimDto Map(ApiScopeClaim source);
public override partial void Map(ApiScopeClaim source, ApiScopeClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiScopePropertyToApiScopePropertyDtoMapper : MapperBase<ApiScopeProperty, ApiScopePropertyDto>
{
public override partial ApiScopePropertyDto Map(ApiScopeProperty source);
public override partial void Map(ApiScopeProperty source, ApiScopePropertyDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class ApiScopeToApiScopeDtoMapper : MapperBase<ApiScope, ApiScopeDto>
{
public override partial ApiScopeDto Map(ApiScope source);
public override partial void Map(ApiScope source, ApiScopeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiResourcePropertyToApiResourcePropertyDtoMapper : MapperBase<ApiResourceProperty, ApiResourcePropertyDto>
{
public override partial ApiResourcePropertyDto Map(ApiResourceProperty source);
public override partial void Map(ApiResourceProperty source, ApiResourcePropertyDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiResourceSecretToApiResourceSecretDtoMapper : MapperBase<ApiResourceSecret, ApiResourceSecretDto>
{
public override partial ApiResourceSecretDto Map(ApiResourceSecret source);
public override partial void Map(ApiResourceSecret source, ApiResourceSecretDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiResourceScopeToApiResourceScopeDtoMapper : MapperBase<ApiResourceScope, ApiResourceScopeDto>
{
public override partial ApiResourceScopeDto Map(ApiResourceScope source);
public override partial void Map(ApiResourceScope source, ApiResourceScopeDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ApiResourceClaimToApiResourceClaimDtoMapper : MapperBase<ApiResourceClaim, ApiResourceClaimDto>
{
public override partial ApiResourceClaimDto Map(ApiResourceClaim source);
public override partial void Map(ApiResourceClaim source, ApiResourceClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class ApiResourceToApiResourceDtoMapper : MapperBase<ApiResource, ApiResourceDto>
{
public override partial ApiResourceDto Map(ApiResource source);
public override partial void Map(ApiResource source, ApiResourceDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class IdentityResourceClaimToIdentityResourceClaimDtoMapper : MapperBase<IdentityResourceClaim, IdentityResourceClaimDto>
{
public override partial IdentityResourceClaimDto Map(IdentityResourceClaim source);
public override partial void Map(IdentityResourceClaim source, IdentityResourceClaimDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class IdentityResourcePropertyToIdentityResourcePropertyDtoMapper : MapperBase<IdentityResourceProperty, IdentityResourcePropertyDto>
{
public override partial IdentityResourcePropertyDto Map(IdentityResourceProperty source);
public override partial void Map(IdentityResourceProperty source, IdentityResourcePropertyDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class IdentityResourceToIdentityResourceDtoMapper : MapperBase<IdentityResource, IdentityResourceDto>
{
public override partial IdentityResourceDto Map(IdentityResource source);
public override partial void Map(IdentityResource source, IdentityResourceDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class PersistedGrantToPersistedGrantDtoMapper : MapperBase<PersistedGrant, PersistedGrantDto>
{
public override partial PersistedGrantDto Map(PersistedGrant source);
public override partial void Map(PersistedGrant source, PersistedGrantDto destination);
}

15
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerApplicationModule.cs

@ -1,5 +1,5 @@
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.IdentityServer;
@ -7,19 +7,12 @@ namespace LINGYUN.Abp.IdentityServer;
[DependsOn(
typeof(AbpIdentityServerApplicationContractsModule),
typeof(AbpIdentityServerDomainModule),
typeof(AbpDddApplicationModule),
typeof(AbpAutoMapperModule)
typeof(AbpDddApplicationModule)
)]
public class AbpIdentityServerApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.Configurators.Add(ctx =>
{
ctx.MapperConfiguration.AddProfile<AbpIdentityServerAutoMapperProfile>();
});
});
context.Services.AddMapperlyObjectMapper<AbpIdentityServerApplicationModule>();
}
}

56
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Application/LINGYUN/Abp/IdentityServer/AbpIdentityServerAutoMapperProfile.cs

@ -1,56 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.IdentityServer.ApiResources;
using LINGYUN.Abp.IdentityServer.ApiScopes;
using LINGYUN.Abp.IdentityServer.Clients;
using LINGYUN.Abp.IdentityServer.Grants;
using LINGYUN.Abp.IdentityServer.IdentityResources;
using Volo.Abp.IdentityServer.ApiResources;
using Volo.Abp.IdentityServer.ApiScopes;
using Volo.Abp.IdentityServer.Clients;
using Volo.Abp.IdentityServer.Grants;
using Volo.Abp.IdentityServer.IdentityResources;
namespace LINGYUN.Abp.IdentityServer;
public class AbpIdentityServerAutoMapperProfile : Profile
{
public AbpIdentityServerAutoMapperProfile()
{
CreateMap<ClientSecret, ClientSecretDto>();
CreateMap<ClientScope, ClientScopeDto>();
CreateMap<ClientGrantType, ClientGrantTypeDto>();
CreateMap<ClientCorsOrigin, ClientCorsOriginDto>();
CreateMap<ClientRedirectUri, ClientRedirectUriDto>();
CreateMap<ClientPostLogoutRedirectUri, ClientPostLogoutRedirectUriDto>();
CreateMap<ClientIdPRestriction, ClientIdPRestrictionDto>();
CreateMap<ClientClaim, ClientClaimDto>();
CreateMap<ClientProperty, ClientPropertyDto>();
CreateMap<Client, ClientDto>();
//.ForMember(dto => dto.AllowedCorsOrigins, map => map.MapFrom(client => client.AllowedCorsOrigins.Select(origin => origin.Origin).ToList()))
//.ForMember(dto => dto.AllowedGrantTypes, map => map.MapFrom(client => client.AllowedGrantTypes.Select(grantType => grantType.GrantType).ToList()))
//.ForMember(dto => dto.AllowedScopes, map => map.MapFrom(client => client.AllowedScopes.Select(scope => scope.Scope).ToList()))
//.ForMember(dto => dto.IdentityProviderRestrictions, map => map.MapFrom(client => client.IdentityProviderRestrictions.Select(provider => provider.Provider).ToList()))
//.ForMember(dto => dto.PostLogoutRedirectUris, map => map.MapFrom(client => client.PostLogoutRedirectUris.Select(uri => uri.PostLogoutRedirectUri).ToList()))
//.ForMember(dto => dto.RedirectUris, map => map.MapFrom(client => client.RedirectUris.Select(uri => uri.RedirectUri).ToList()));
// CreateMap<ApiSecret, ApiResourceSecretDto>();
CreateMap<ApiScopeClaim, ApiScopeClaimDto>();
CreateMap<ApiScopeProperty, ApiScopePropertyDto>();
CreateMap<ApiScope, ApiScopeDto>();
CreateMap<ApiResourceProperty, ApiResourcePropertyDto>();
CreateMap<ApiResourceSecret, ApiResourceSecretDto>();
CreateMap<ApiResourceScope, ApiResourceScopeDto>();
CreateMap<ApiResourceClaim, ApiResourceClaimDto>();
CreateMap<ApiResource, ApiResourceDto>()
.MapExtraProperties();
CreateMap<IdentityResourceClaim, IdentityResourceClaimDto>();
CreateMap<IdentityResourceProperty, IdentityResourcePropertyDto>();
CreateMap<IdentityResource, IdentityResourceDto>()
.MapExtraProperties();
CreateMap<PersistedGrant, PersistedGrantDto>()
.MapExtraProperties();
}
}

1
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.Domain/LINGYUN.Abp.IdentityServer.Domain.csproj

@ -14,6 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" />
</ItemGroup>

1
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.LinkUser/LINGYUN.Abp.IdentityServer.LinkUser.csproj

@ -22,6 +22,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" />
</ItemGroup>

1
aspnet-core/modules/identityServer/LINGYUN.Abp.IdentityServer.SmsValidator/LINGYUN.Abp.IdentityServer.SmsValidator.csproj

@ -24,6 +24,7 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Volo.Abp.IdentityServer.Domain" />
</ItemGroup>

12
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementApplicationModule.cs

@ -1,7 +1,6 @@
using Volo.Abp.Application;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.Modularity;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
namespace LINGYUN.Abp.LocalizationManagement;
@ -13,11 +12,6 @@ public class AbpLocalizationManagementApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpLocalizationManagementApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<LocalizationManagementApplicationMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpLocalizationManagementApplicationModule>();
}
}

12
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LocalizationManagementApplicationMapperProfile.cs

@ -1,12 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.LocalizationManagement;
public class LocalizationManagementApplicationMapperProfile : Profile
{
public LocalizationManagementApplicationMapperProfile()
{
CreateMap<Language, LanguageDto>();
CreateMap<Resource, ResourceDto>();
}
}

18
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Application/LINGYUN/Abp/LocalizationManagement/LocalizationManagementApplicationMappers.cs

@ -0,0 +1,18 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.LocalizationManagement;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LanguageToLanguageDtoMapper : MapperBase<Language, LanguageDto>
{
public override partial LanguageDto Map(Language source);
public override partial void Map(Language source, LanguageDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ResourceToResourceDtoMapper : MapperBase<Resource, ResourceDto>
{
public override partial ResourceDto Map(Resource source);
public override partial void Map(Resource source, ResourceDto destination);
}

2
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN.Abp.LocalizationManagement.Domain.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Polly" />
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
</ItemGroup>

11
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/AbpLocalizationManagementDomainModule.cs

@ -7,19 +7,19 @@ using System;
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Domain;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.Localization;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
namespace LINGYUN.Abp.LocalizationManagement;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpDddDomainModule),
typeof(AbpLocalizationManagementDomainSharedModule))]
public class AbpLocalizationManagementDomainModule : AbpModule
@ -27,12 +27,7 @@ public class AbpLocalizationManagementDomainModule : AbpModule
private readonly CancellationTokenSource cancellationTokenSource = new();
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpLocalizationManagementDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<LocalizationManagementDomainMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpLocalizationManagementDomainModule>();
Configure<AbpLocalizationOptions>(options =>
{

13
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationManagementDomainMapperProfile.cs

@ -1,13 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.LocalizationManagement;
public class LocalizationManagementDomainMapperProfile : Profile
{
public LocalizationManagementDomainMapperProfile()
{
CreateMap<Text, TextEto>();
CreateMap<Resource, ResourceEto>();
CreateMap<Language, LanguageEto>();
}
}

25
aspnet-core/modules/localization-management/LINGYUN.Abp.LocalizationManagement.Domain/LINGYUN/Abp/LocalizationManagement/LocalizationManagementDomainMappers.cs

@ -0,0 +1,25 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.LocalizationManagement;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class TextToTextEtoMapper : MapperBase<Text, TextEto>
{
public override partial TextEto Map(Text source);
public override partial void Map(Text source, TextEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ResourceToResourceEtoMapper : MapperBase<Resource, ResourceEto>
{
public override partial ResourceEto Map(Resource source);
public override partial void Map(Resource source, ResourceEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LanguageToLanguageEtoMapper : MapperBase<Language, LanguageEto>
{
public override partial LanguageEto Map(Language source);
public override partial void Map(Language source, LanguageEto destination);
}

4
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/RevocationIdentitySession.cs

@ -32,8 +32,8 @@ public class RevocationIdentitySession : IOpenIddictServerHandler<OpenIddictServ
public async virtual ValueTask HandleAsync(OpenIddictServerEvents.HandleRevocationRequestContext context)
{
var tenantId = context.Principal.FindTenantId();
var sessionId = context.Principal.FindSessionId();
var tenantId = context.GenericTokenPrincipal.FindTenantId();
var sessionId = context.GenericTokenPrincipal.FindSessionId();
using (CurrentTenant.Change(tenantId))
{
if (!sessionId.IsNullOrWhiteSpace())

4
aspnet-core/modules/openIddict/LINGYUN.Abp.OpenIddict.AspNetCore.Session/LINGYUN/Abp/OpenIddict/AspNetCore/Session/UserinfoIdentitySession.cs

@ -34,10 +34,10 @@ public class UserInfoIdentitySession : IOpenIddictServerHandler<OpenIddictServer
public async virtual ValueTask HandleAsync(OpenIddictServerEvents.HandleUserInfoRequestContext context)
{
var tenantId = context.Principal.FindTenantId();
var tenantId = context.AccessTokenPrincipal.FindTenantId();
using (CurrentTenant.Change(tenantId))
{
if (!await IdentitySessionChecker.ValidateSessionAsync(context.Principal))
if (!await IdentitySessionChecker.ValidateSessionAsync(context.AccessTokenPrincipal))
{
// Errors.InvalidToken ---> 401
// Errors.ExpiredToken ---> 400

2
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN.Abp.OssManagement.Application.csproj

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Ddd.Application" />
<PackageReference Include="Volo.Abp.Caching" />
</ItemGroup>

11
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/AbpOssManagementApplicationModule.cs

@ -1,7 +1,7 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Caching;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.OssManagement;
@ -10,17 +10,12 @@ namespace LINGYUN.Abp.OssManagement;
typeof(AbpOssManagementDomainModule),
typeof(AbpOssManagementApplicationContractsModule),
typeof(AbpCachingModule),
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpDddApplicationModule))]
public class AbpOssManagementApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpOssManagementApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<OssManagementApplicationAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpOssManagementApplicationModule>();
}
}

18
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssManagementApplicationAutoMapperProfile.cs

@ -1,18 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.OssManagement;
public class OssManagementApplicationAutoMapperProfile : Profile
{
public OssManagementApplicationAutoMapperProfile()
{
CreateMap<OssContainer, OssContainerDto>();
CreateMap<OssObject, OssObjectDto>()
.ForMember(dto => dto.Path, map => map.MapFrom(src => src.Prefix));
CreateMap<GetOssContainersResponse, OssContainersResultDto>();
CreateMap<GetOssObjectsResponse, OssObjectsResultDto>();
CreateMap<FileShareCacheItem, MyFileShareDto>();
}
}

49
aspnet-core/modules/oss-management/LINGYUN.Abp.OssManagement.Application/LINGYUN/Abp/OssManagement/OssManagementApplicationMappers.cs

@ -0,0 +1,49 @@
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.OssManagement;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class OssContainerToOssContainerDtoMapper : MapperBase<OssContainer, OssContainerDto>
{
public override partial OssContainerDto Map(OssContainer source);
public override partial void Map(OssContainer source, OssContainerDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class OssObjectToOssObjectDtoMapper : MapperBase<OssObject, OssObjectDto>
{
[MapperIgnoreTarget(nameof(OssObjectDto.Path))]
[MapperIgnoreSource(nameof(OssObject.Prefix))]
public override partial OssObjectDto Map(OssObject source);
[MapperIgnoreTarget(nameof(OssObjectDto.Path))]
[MapperIgnoreSource(nameof(OssObject.Prefix))]
public override partial void Map(OssObject source, OssObjectDto destination);
public override void AfterMap(OssObject source, OssObjectDto destination)
{
destination.Path = source.Prefix;
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class GetOssContainersResponseToOssContainersResultDtoMapper : MapperBase<GetOssContainersResponse, OssContainersResultDto>
{
public override partial OssContainersResultDto Map(GetOssContainersResponse source);
public override partial void Map(GetOssContainersResponse source, OssContainersResultDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class GetOssObjectsResponseToOssObjectsResultDtoMapper : MapperBase<GetOssObjectsResponse, OssObjectsResultDto>
{
public override partial OssObjectsResultDto Map(GetOssObjectsResponse source);
public override partial void Map(GetOssObjectsResponse source, OssObjectsResultDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class FileShareCacheItemToMyFileShareDtoMapper : MapperBase<FileShareCacheItem, MyFileShareDto>
{
public override partial MyFileShareDto Map(FileShareCacheItem source);
public override partial void Map(FileShareCacheItem source, MyFileShareDto destination);
}

125
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappers.cs

@ -0,0 +1,125 @@
using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Feedbacks;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Platform;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class PackageBlobTPackageBlobDtoMapper : MapperBase<PackageBlob, PackageBlobDto>
{
public override partial PackageBlobDto Map(PackageBlob source);
public override partial void Map(PackageBlob source, PackageBlobDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class PackageTPackageDtoMapper : MapperBase<Package, PackageDto>
{
public override partial PackageDto Map(Package source);
public override partial void Map(Package source, PackageDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class DataItemTDataItemDtoMapper : MapperBase<DataItem, DataItemDto>
{
public override partial DataItemDto Map(DataItem source);
public override partial void Map(DataItem source, DataItemDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class DataTDataDtoMapper : MapperBase<Data, DataDto>
{
public override partial DataDto Map(Data source);
public override partial void Map(Data source, DataDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class MenuTMenuDtoMapper : MapperBase<Menu, MenuDto>
{
[MapperIgnoreTarget(nameof(MenuDto.Startup))]
[MapProperty(nameof(Menu.ExtraProperties), nameof(MenuDto.Meta))]
public override partial MenuDto Map(Menu source);
[MapperIgnoreTarget(nameof(MenuDto.Startup))]
[MapProperty(nameof(Menu.ExtraProperties), nameof(MenuDto.Meta))]
public override partial void Map(Menu source, MenuDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LayoutTLayoutDtoMapper : MapperBase<Layout, LayoutDto>
{
[MapProperty(nameof(Layout.ExtraProperties), nameof(LayoutDto.Meta))]
public override partial LayoutDto Map(Layout source);
[MapProperty(nameof(Layout.ExtraProperties), nameof(LayoutDto.Meta))]
public override partial void Map(Layout source, LayoutDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class UserFavoriteMenuTUserFavoriteMenuDtoMapper : MapperBase<UserFavoriteMenu, UserFavoriteMenuDto>
{
public override partial UserFavoriteMenuDto Map(UserFavoriteMenu source);
public override partial void Map(UserFavoriteMenu source, UserFavoriteMenuDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class FeedbackTFeedbackDtoMapper : MapperBase<Feedback, FeedbackDto>
{
public override partial FeedbackDto Map(Feedback source);
public override partial void Map(Feedback source, FeedbackDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class FeedbackCommentTFeedbackCommentDtoMapper : MapperBase<FeedbackComment, FeedbackCommentDto>
{
public override partial FeedbackCommentDto Map(FeedbackComment source);
public override partial void Map(FeedbackComment source, FeedbackCommentDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class FeedbackAttachmentTFeedbackAttachmentDtoMapper : MapperBase<FeedbackAttachment, FeedbackAttachmentDto>
{
public override partial FeedbackAttachmentDto Map(FeedbackAttachment source);
public override partial void Map(FeedbackAttachment source, FeedbackAttachmentDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EmailMessageAttachmentTEmailMessageAttachmentDtoMapper : MapperBase<EmailMessageAttachment, EmailMessageAttachmentDto>
{
public override partial EmailMessageAttachmentDto Map(EmailMessageAttachment source);
public override partial void Map(EmailMessageAttachment source, EmailMessageAttachmentDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EmailMessageHeaderTEmailMessageHeaderDtoMapper : MapperBase<EmailMessageHeader, EmailMessageHeaderDto>
{
public override partial EmailMessageHeaderDto Map(EmailMessageHeader source);
public override partial void Map(EmailMessageHeader source, EmailMessageHeaderDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EmailMessageTEmailMessageDtoMapper : MapperBase<EmailMessage, EmailMessageDto>
{
public override partial EmailMessageDto Map(EmailMessage source);
public override partial void Map(EmailMessage source, EmailMessageDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SmsMessageTSmsMessageDtoMapper : MapperBase<SmsMessage, SmsMessageDto>
{
public override partial SmsMessageDto Map(SmsMessage source);
public override partial void Map(SmsMessage source, SmsMessageDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EnterpriseTEnterpriseDtoMapper : MapperBase<Enterprise, EnterpriseDto>
{
public override partial EnterpriseDto Map(Enterprise source);
public override partial void Map(Enterprise source, EnterpriseDto destination);
}

39
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationMappingProfile.cs

@ -1,39 +0,0 @@
using AutoMapper;
using LINGYUN.Platform.Datas;
using LINGYUN.Platform.Feedbacks;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Portal;
namespace LINGYUN.Platform;
public class PlatformApplicationMappingProfile : Profile
{
public PlatformApplicationMappingProfile()
{
CreateMap<PackageBlob, PackageBlobDto>();
CreateMap<Package, PackageDto>();
CreateMap<DataItem, DataItemDto>();
CreateMap<Data, DataDto>();
CreateMap<Menu, MenuDto>()
.ForMember(dto => dto.Meta, map => map.MapFrom(src => src.ExtraProperties))
.ForMember(dto => dto.Startup, map => map.Ignore());
CreateMap<Layout, LayoutDto>()
.ForMember(dto => dto.Meta, map => map.MapFrom(src => src.ExtraProperties));
CreateMap<UserFavoriteMenu, UserFavoriteMenuDto>();
CreateMap<Feedback, FeedbackDto>();
CreateMap<FeedbackComment, FeedbackCommentDto>();
CreateMap<FeedbackAttachment, FeedbackAttachmentDto>();
CreateMap<EmailMessageAttachment, EmailMessageAttachmentDto>();
CreateMap<EmailMessageHeader, EmailMessageHeaderDto>();
CreateMap<EmailMessage, EmailMessageDto>();
CreateMap<SmsMessage, SmsMessageDto>();
CreateMap<Enterprise, EnterpriseDto>();
}
}

8
aspnet-core/modules/platform/LINGYUN.Platform.Application/LINGYUN/Platform/PlatformApplicationModule.cs

@ -1,6 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Platform;
@ -13,11 +12,6 @@ public class PlatformApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<PlatformApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<PlatformApplicationModule>(validate: true);
});
context.Services.AddMapperlyObjectMapper<PlatformApplicationModule>();
}
}

2
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN.Platform.Domain.csproj

@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.BlobStoring" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="Volo.Abp.Settings" />

57
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappers.cs

@ -0,0 +1,57 @@
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Platform;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class LayoutToLayoutEtoMapper : MapperBase<Layout, LayoutEto>
{
public override partial LayoutEto Map(Layout source);
public override partial void Map(Layout source, LayoutEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class MenuToMenuEtoMapper : MapperBase<Menu, MenuEto>
{
public override partial MenuEto Map(Menu source);
public override partial void Map(Menu source, MenuEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class UserMenuToUserMenuEtoMapper : MapperBase<UserMenu, UserMenuEto>
{
public override partial UserMenuEto Map(UserMenu source);
public override partial void Map(UserMenu source, UserMenuEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class RoleMenuToRoleMenuEtoMapper : MapperBase<RoleMenu, RoleMenuEto>
{
public override partial RoleMenuEto Map(RoleMenu source);
public override partial void Map(RoleMenu source, RoleMenuEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class PackageToPackageEtoMapper : MapperBase<Package, PackageEto>
{
public override partial PackageEto Map(Package source);
public override partial void Map(Package source, PackageEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EmailMessageToEmailMessageEtoMapper : MapperBase<EmailMessage, EmailMessageEto>
{
public override partial EmailMessageEto Map(EmailMessage source);
public override partial void Map(EmailMessage source, EmailMessageEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class SmsMessageToSmsMessageEtoMapper : MapperBase<SmsMessage, SmsMessageEto>
{
public override partial SmsMessageEto Map(SmsMessage source);
public override partial void Map(SmsMessage source, SmsMessageEto destination);
}

24
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainMappingProfile.cs

@ -1,24 +0,0 @@
using AutoMapper;
using LINGYUN.Platform.Layouts;
using LINGYUN.Platform.Menus;
using LINGYUN.Platform.Messages;
using LINGYUN.Platform.Packages;
namespace LINGYUN.Platform;
public class PlatformDomainMappingProfile : Profile
{
public PlatformDomainMappingProfile()
{
CreateMap<Layout, LayoutEto>();
CreateMap<Menu, MenuEto>();
CreateMap<UserMenu, UserMenuEto>();
CreateMap<RoleMenu, RoleMenuEto>();
CreateMap<Package, PackageEto>();
CreateMap<EmailMessage, EmailMessageEto>();
CreateMap<SmsMessage, SmsMessageEto>();
}
}

12
aspnet-core/modules/platform/LINGYUN.Platform.Domain/LINGYUN/Platform/PlatformDomainModule.cs

@ -6,11 +6,11 @@ using LINGYUN.Platform.ObjectExtending;
using LINGYUN.Platform.Packages;
using LINGYUN.Platform.Routes;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.BlobStoring;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.Emailing;
using Volo.Abp.EventBus;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.Sms;
@ -22,24 +22,20 @@ namespace LINGYUN.Platform;
typeof(AbpSmsModule),
typeof(AbpEmailingModule),
typeof(AbpEventBusModule),
typeof(AbpBlobStoringModule),
typeof(AbpEventBusModule),
typeof(AbpMapperlyModule),
typeof(PlatformDomainSharedModule))]
public class PlatformDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<PlatformDomainModule>();
context.Services.AddMapperlyObjectMapper<PlatformDomainModule>();
Configure<DataItemMappingOptions>(options =>
{
options.SetDefaultMapping();
});
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<PlatformDomainMappingProfile>(validate: true);
});
Configure<AbpBlobStoringOptions>(options =>
{
options.Containers.Configure<PackageContainer>(containerConfiguration =>

3
aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.EntityFrameworkCore/FodyWeavers.xml

@ -0,0 +1,3 @@
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
<ConfigureAwait />
</Weavers>

30
aspnet-core/modules/project/LINGYUN.Abp.ProjectManagement.EntityFrameworkCore/FodyWeavers.xsd

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="utf-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
<xs:element name="Weavers">
<xs:complexType>
<xs:all>
<xs:element name="ConfigureAwait" minOccurs="0" maxOccurs="1">
<xs:complexType>
<xs:attribute name="ContinueOnCapturedContext" type="xs:boolean" />
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="VerifyAssembly" type="xs:boolean">
<xs:annotation>
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
<xs:annotation>
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="GenerateXsd" type="xs:boolean">
<xs:annotation>
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:schema>

10
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/AbpMessageServiceApplicationAutoMapperProfile.cs

@ -1,10 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.MessageService;
public class AbpMessageServiceApplicationAutoMapperProfile : Profile
{
public AbpMessageServiceApplicationAutoMapperProfile()
{
}
}

7
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Application/LINGYUN/Abp/MessageService/AbpMessageServiceApplicationModule.cs

@ -1,4 +1,4 @@
using Volo.Abp.AutoMapper;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.MessageService;
@ -10,9 +10,6 @@ public class AbpMessageServiceApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpMessageServiceApplicationAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpMessageServiceApplicationModule>();
}
}

2
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN.Abp.MessageService.Domain.csproj

@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Caching" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.BackgroundJobs" />
<PackageReference Include="Volo.Abp.Users.Abstractions" />
</ItemGroup>

11
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/AbpMessageServiceDomainModule.cs

@ -1,19 +1,19 @@
using LINGYUN.Abp.IM.Localization;
using LINGYUN.Abp.MessageService.Chat;
using LINGYUN.Abp.MessageService.Localization;
using LINGYUN.Abp.MessageService.Mapper;
using LINGYUN.Abp.MessageService.ObjectExtending;
using LINGYUN.Abp.Notifications;
using Volo.Abp.AutoMapper;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Caching;
using Volo.Abp.Localization;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending.Modularity;
namespace LINGYUN.Abp.MessageService;
[DependsOn(
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpCachingModule),
typeof(AbpNotificationsModule),
typeof(AbpMessageServiceDomainSharedModule))]
@ -21,10 +21,7 @@ public class AbpMessageServiceDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<MessageServiceDomainAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpMessageServiceDomainModule>();
Configure<AbpLocalizationOptions>(options =>
{

46
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/Mapper/MessageServiceDomainAutoMapperProfile.cs

@ -1,46 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.IM.Groups;
using LINGYUN.Abp.IM.Messages;
using LINGYUN.Abp.MessageService.Chat;
using LINGYUN.Abp.MessageService.Groups;
using Volo.Abp.AutoMapper;
using Volo.Abp.Data;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.MessageService.Mapper;
public class MessageServiceDomainAutoMapperProfile : Profile
{
public MessageServiceDomainAutoMapperProfile()
{
CreateMessageMap<GroupMessage, ChatMessage>()
.ForMember(dto => dto.Content, map => map.MapFrom(src => src.Content))
.ForMember(dto => dto.GroupId, map => map.MapFrom(src => src.GroupId.ToString()))
.Ignore(dto => dto.ToUserId);
CreateMessageMap<UserMessage, ChatMessage>()
.ForMember(dto => dto.ToUserId, map => map.MapFrom(src => src.ReceiveUserId))
.Ignore(dto => dto.GroupId);
CreateMap<ChatGroup, Group>()
.ForMember(g => g.Id, map => map.MapFrom(src => src.GroupId.ToString()))
.ForMember(g => g.MaxUserLength, map => map.MapFrom(src => src.MaxUserCount))
.Ignore(g => g.GroupUserCount);
}
protected IMappingExpression<TSource, TDestination> CreateMessageMap<TSource, TDestination>()
where TSource : Message
where TDestination : ChatMessage
{
return CreateMap<TSource, TDestination>()
.ForMember(dto => dto.Content, map => map.MapFrom(src => src.Content))
.ForMember(dto => dto.MessageId, map => map.MapFrom(src => src.MessageId.ToString()))
.ForMember(dto => dto.FormUserId, map => map.MapFrom(src => src.CreatorId))
.ForMember(dto => dto.FormUserName, map => map.MapFrom(src => src.SendUserName))
.ForMember(dto => dto.SendTime, map => map.MapFrom(src => src.CreationTime))
.ForMember(dto => dto.MessageType, map => map.MapFrom(src => src.Type))
.ForMember(dto => dto.Source, map => map.MapFrom(src => src.Source))
.ForMember(dto => dto.IsAnonymous, map => map.MapFrom(src => src.GetProperty(nameof(ChatMessage.IsAnonymous), false)))
.MapExtraProperties(MappingPropertyDefinitionChecks.None);
}
}

79
aspnet-core/modules/realtime-message/LINGYUN.Abp.MessageService.Domain/LINGYUN/Abp/MessageService/MessageServiceDomainMappers.cs

@ -0,0 +1,79 @@
using LINGYUN.Abp.IM.Groups;
using LINGYUN.Abp.IM.Messages;
using LINGYUN.Abp.MessageService.Chat;
using LINGYUN.Abp.MessageService.Groups;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.Mapperly;
using Volo.Abp.ObjectExtending;
namespace LINGYUN.Abp.MessageService;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class GroupMessageToChatMessageMapper : MapperBase<GroupMessage, ChatMessage>
{
[MapProperty(nameof(GroupMessage.GroupId), nameof(ChatMessage.GroupId))]
[MapProperty(nameof(GroupMessage.CreatorId), nameof(ChatMessage.FormUserId))]
[MapProperty(nameof(GroupMessage.SendUserName), nameof(ChatMessage.FormUserName))]
[MapProperty(nameof(GroupMessage.CreationTime), nameof(ChatMessage.SendTime))]
[MapProperty(nameof(GroupMessage.Type), nameof(ChatMessage.MessageType))]
[MapperIgnoreTarget(nameof(ChatMessage.ToUserId))]
[MapperIgnoreTarget(nameof(ChatMessage.IsAnonymous))]
public override partial ChatMessage Map(GroupMessage source);
[MapProperty(nameof(GroupMessage.GroupId), nameof(ChatMessage.GroupId))]
[MapProperty(nameof(GroupMessage.CreatorId), nameof(ChatMessage.FormUserId))]
[MapProperty(nameof(GroupMessage.SendUserName), nameof(ChatMessage.FormUserName))]
[MapProperty(nameof(GroupMessage.CreationTime), nameof(ChatMessage.SendTime))]
[MapProperty(nameof(GroupMessage.Type), nameof(ChatMessage.MessageType))]
[MapperIgnoreTarget(nameof(ChatMessage.ToUserId))]
[MapperIgnoreTarget(nameof(ChatMessage.IsAnonymous))]
public override partial void Map(GroupMessage source, ChatMessage destination);
public override void AfterMap(GroupMessage source, ChatMessage destination)
{
destination.IsAnonymous = source.GetProperty(nameof(ChatMessage.IsAnonymous), false);
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties(DefinitionChecks = MappingPropertyDefinitionChecks.None)]
public partial class UserMessageToChatMessageMapper : MapperBase<UserMessage, ChatMessage>
{
[MapProperty(nameof(UserMessage.ReceiveUserId), nameof(ChatMessage.ToUserId))]
[MapProperty(nameof(UserMessage.CreatorId), nameof(ChatMessage.FormUserId))]
[MapProperty(nameof(UserMessage.SendUserName), nameof(ChatMessage.FormUserName))]
[MapProperty(nameof(UserMessage.CreationTime), nameof(ChatMessage.SendTime))]
[MapProperty(nameof(UserMessage.Type), nameof(ChatMessage.MessageType))]
[MapperIgnoreTarget(nameof(ChatMessage.GroupId))]
[MapperIgnoreTarget(nameof(ChatMessage.IsAnonymous))]
public override partial ChatMessage Map(UserMessage source);
[MapProperty(nameof(UserMessage.ReceiveUserId), nameof(ChatMessage.ToUserId))]
[MapProperty(nameof(UserMessage.CreatorId), nameof(ChatMessage.FormUserId))]
[MapProperty(nameof(UserMessage.SendUserName), nameof(ChatMessage.FormUserName))]
[MapProperty(nameof(UserMessage.CreationTime), nameof(ChatMessage.SendTime))]
[MapProperty(nameof(UserMessage.Type), nameof(ChatMessage.MessageType))]
[MapperIgnoreTarget(nameof(ChatMessage.GroupId))]
[MapperIgnoreTarget(nameof(ChatMessage.IsAnonymous))]
public override partial void Map(UserMessage source, ChatMessage destination);
public override void AfterMap(UserMessage source, ChatMessage destination)
{
destination.IsAnonymous = source.GetProperty(nameof(ChatMessage.IsAnonymous), false);
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class ChatGroupToGroupMapper : MapperBase<ChatGroup, Group>
{
[MapProperty(nameof(ChatGroup.GroupId), nameof(Group.Id))]
[MapProperty(nameof(ChatGroup.MaxUserCount), nameof(Group.MaxUserLength))]
[MapperIgnoreTarget(nameof(Group.GroupUserCount))]
public override partial Group Map(ChatGroup source);
[MapProperty(nameof(ChatGroup.GroupId), nameof(Group.Id))]
[MapProperty(nameof(ChatGroup.MaxUserCount), nameof(Group.MaxUserLength))]
[MapperIgnoreTarget(nameof(Group.GroupUserCount))]
public override partial void Map(ChatGroup source, Group destination);
}

31
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationAutoMapperProfile.cs

@ -1,31 +0,0 @@
using AutoMapper;
using System;
namespace LINGYUN.Abp.Notifications;
public class AbpNotificationsApplicationAutoMapperProfile : Profile
{
public AbpNotificationsApplicationAutoMapperProfile()
{
CreateMap<UserNotificationInfo, UserNotificationDto>()
.ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString()))
.ForMember(dto => dto.Lifetime, map => map.Ignore())
.ForMember(dto => dto.Data, map => map.MapFrom((src, nfi) =>
{
if (src != null)
{
var dataType = Type.GetType(src.NotificationTypeName);
if (dataType != null)
{
var data = Activator.CreateInstance(dataType);
if (data is NotificationData notificationData)
{
notificationData.ExtraProperties = src.ExtraProperties;
return notificationData;
}
}
}
return new NotificationData();
}));
}
}

35
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationMappers.cs

@ -0,0 +1,35 @@
using Riok.Mapperly.Abstractions;
using System;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Notifications;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class UserNotificationInfoToUserNotificationDtoMapper : MapperBase<UserNotificationInfo, UserNotificationDto>
{
[MapProperty(nameof(UserNotificationInfo.NotificationId), nameof(UserNotificationDto.Id))]
[MapperIgnoreTarget(nameof(UserNotificationDto.Lifetime))]
[MapPropertyFromSource(nameof(UserNotificationDto.Data), Use = nameof(TryGetNotificationData))]
public override partial UserNotificationDto Map(UserNotificationInfo source);
[MapProperty(nameof(UserNotificationInfo.NotificationId), nameof(UserNotificationDto.Id))]
[MapperIgnoreTarget(nameof(UserNotificationDto.Lifetime))]
[MapPropertyFromSource(nameof(UserNotificationDto.Data), Use = nameof(TryGetNotificationData))]
public override partial void Map(UserNotificationInfo source, UserNotificationDto destination);
[UserMapping(Default = false)]
private static NotificationData TryGetNotificationData(UserNotificationInfo source)
{
if (source != null)
{
var dataType = Type.GetType(source.NotificationTypeName);
var data = Activator.CreateInstance(dataType);
if (data is NotificationData notificationData)
{
notificationData.ExtraProperties = source.ExtraProperties;
return notificationData;
}
}
return new NotificationData();
}
}

8
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Application/LINGYUN/Abp/Notifications/AbpNotificationsApplicationModule.cs

@ -1,6 +1,5 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Application;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Notifications;
@ -13,11 +12,6 @@ public class AbpNotificationsApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpNotificationsApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpNotificationsApplicationAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpNotificationsApplicationModule>();
}
}

2
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN.Abp.Notifications.Domain.csproj

@ -16,7 +16,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Caching" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.BackgroundJobs" />
<PackageReference Include="Volo.Abp.Users.Abstractions" />
<PackageReference Include="Polly" />

52
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainAutoMapperProfile.cs

@ -1,52 +0,0 @@
using AutoMapper;
using System;
namespace LINGYUN.Abp.Notifications;
public class AbpNotificationsDomainAutoMapperProfile : Profile
{
public AbpNotificationsDomainAutoMapperProfile()
{
CreateMap<Notification, NotificationInfo>()
.ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString()))
.ForMember(dto => dto.Name, map => map.MapFrom(src => src.NotificationName))
.ForMember(dto => dto.Lifetime, map => map.Ignore())
.ForMember(dto => dto.Type, map => map.MapFrom(src => src.Type))
.ForMember(dto => dto.ContentType, map => map.MapFrom(src => src.ContentType))
.ForMember(dto => dto.Severity, map => map.MapFrom(src => src.Severity))
.ForMember(dto => dto.CreationTime, map => map.MapFrom(src => src.CreationTime))
.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)
{
notificationData.ExtraProperties = src.ExtraProperties;
return notificationData;
}
return new NotificationData();
}));
CreateMap<UserNotificationInfo, NotificationInfo>()
.ForMember(dto => dto.Id, map => map.MapFrom(src => src.NotificationId.ToString()))
.ForMember(dto => dto.Name, map => map.MapFrom(src => src.Name))
.ForMember(dto => dto.Lifetime, map => map.Ignore())
.ForMember(dto => dto.Type, map => map.MapFrom(src => src.Type))
.ForMember(dto => dto.ContentType, map => map.MapFrom(src => src.ContentType))
.ForMember(dto => dto.Severity, map => map.MapFrom(src => src.Severity))
.ForMember(dto => dto.CreationTime, map => map.MapFrom(src => src.CreationTime))
.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)
{
notificationData.ExtraProperties = src.ExtraProperties;
return notificationData;
}
return new NotificationData();
}));
CreateMap<UserSubscribe, NotificationSubscriptionInfo>();
}
}

76
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainMappers.cs

@ -0,0 +1,76 @@
using Riok.Mapperly.Abstractions;
using System;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Notifications;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class NotificationToNotificationInfoMapper : MapperBase<Notification, NotificationInfo>
{
[MapProperty(nameof(Notification.NotificationId), nameof(NotificationInfo.Id))]
[MapProperty(nameof(Notification.NotificationName), nameof(NotificationInfo.Name))]
[MapperIgnoreTarget(nameof(NotificationInfo.Lifetime))]
[MapPropertyFromSource(nameof(NotificationInfo.Data), Use = nameof(TryGetNotificationData))]
public override partial NotificationInfo Map(Notification source);
[MapProperty(nameof(Notification.NotificationId), nameof(NotificationInfo.Id))]
[MapProperty(nameof(Notification.NotificationName), nameof(NotificationInfo.Name))]
[MapperIgnoreTarget(nameof(NotificationInfo.Lifetime))]
[MapPropertyFromSource(nameof(NotificationInfo.Data), Use = nameof(TryGetNotificationData))]
public override partial void Map(Notification source, NotificationInfo destination);
[UserMapping(Default = false)]
private static NotificationData TryGetNotificationData(Notification source)
{
if (source != null)
{
var dataType = Type.GetType(source.NotificationTypeName);
var data = Activator.CreateInstance(dataType);
if (data is NotificationData notificationData)
{
notificationData.ExtraProperties = source.ExtraProperties;
return notificationData;
}
}
return new NotificationData();
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class UserNotificationInfoToNotificationInfoMapper : MapperBase<UserNotificationInfo, NotificationInfo>
{
[MapProperty(nameof(UserNotificationInfo.NotificationId), nameof(NotificationInfo.Id))]
[MapProperty(nameof(UserNotificationInfo.Name), nameof(NotificationInfo.Name))]
[MapperIgnoreTarget(nameof(NotificationInfo.Lifetime))]
[MapPropertyFromSource(nameof(NotificationInfo.Data), Use = nameof(TryGetNotificationData))]
public override partial NotificationInfo Map(UserNotificationInfo source);
[MapProperty(nameof(UserNotificationInfo.NotificationId), nameof(NotificationInfo.Id))]
[MapProperty(nameof(UserNotificationInfo.Name), nameof(NotificationInfo.Name))]
[MapperIgnoreTarget(nameof(NotificationInfo.Lifetime))]
[MapPropertyFromSource(nameof(NotificationInfo.Data), Use = nameof(TryGetNotificationData))]
public override partial void Map(UserNotificationInfo source, NotificationInfo destination);
[UserMapping(Default = false)]
private static NotificationData TryGetNotificationData(UserNotificationInfo source)
{
if (source != null)
{
var dataType = Type.GetType(source.NotificationTypeName);
var data = Activator.CreateInstance(dataType);
if (data is NotificationData notificationData)
{
notificationData.ExtraProperties = source.ExtraProperties;
return notificationData;
}
}
return new NotificationData();
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class UserSubscribeToNotificationSubscriptionInfoMapper : MapperBase<UserSubscribe, NotificationSubscriptionInfo>
{
public override partial NotificationSubscriptionInfo Map(UserSubscribe source);
public override partial void Map(UserSubscribe source, NotificationSubscriptionInfo destination);
}

11
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.Domain/LINGYUN/Abp/Notifications/AbpNotificationsDomainModule.cs

@ -2,9 +2,9 @@
using System.Threading;
using System.Threading.Tasks;
using Volo.Abp;
using Volo.Abp.AutoMapper;
using Volo.Abp.Caching;
using Volo.Abp.Data;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.Threading;
@ -12,7 +12,7 @@ namespace LINGYUN.Abp.Notifications;
[DependsOn(
typeof(AbpCachingModule),
typeof(AbpAutoMapperModule),
typeof(AbpMapperlyModule),
typeof(AbpNotificationsModule),
typeof(AbpNotificationsDomainSharedModule))]
public class AbpNotificationsDomainModule : AbpModule
@ -21,6 +21,8 @@ public class AbpNotificationsDomainModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddMapperlyObjectMapper<AbpNotificationsDomainModule>();
if (context.Services.IsDataMigrationEnvironment())
{
Configure<AbpNotificationsManagementOptions>(options =>
@ -29,11 +31,6 @@ public class AbpNotificationsDomainModule : AbpModule
options.IsDynamicNotificationsStoreEnabled = false;
});
}
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpNotificationsDomainAutoMapperProfile>(validate: true);
});
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)

2
aspnet-core/modules/realtime-notifications/LINGYUN.Abp.Notifications.EntityFrameworkCore/LINGYUN/Abp/Notifications/EntityFrameworkCore/AbpNotificationsEntityFrameworkCoreModule.cs

@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Caching;
using Volo.Abp.Modularity;
@ -7,7 +6,6 @@ namespace LINGYUN.Abp.Notifications.EntityFrameworkCore;
[DependsOn(
typeof(AbpCachingModule),
typeof(AbpAutoMapperModule),
typeof(AbpNotificationsDomainModule))]
public class AbpNotificationsEntityFrameworkCoreModule : AbpModule
{

33
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationAutoMapperProfile.cs

@ -1,33 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.Saas.Editions;
using LINGYUN.Abp.Saas.Tenants;
namespace LINGYUN.Abp.Saas;
public class AbpSaasApplicationAutoMapperProfile : Profile
{
public AbpSaasApplicationAutoMapperProfile()
{
CreateMap<TenantConnectionString, TenantConnectionStringDto>();
CreateMap<Tenant, TenantDto>()
.ForMember(dto => dto.EditionId, map =>
{
map.MapFrom((tenant, dto) =>
{
return tenant.Edition?.Id;
});
})
.ForMember(dto => dto.EditionName, map =>
{
map.MapFrom((tenant, dto) =>
{
return tenant.Edition?.DisplayName;
});
})
.MapExtraProperties();
CreateMap<Edition, EditionDto>()
.MapExtraProperties();
}
}

37
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationMappers.cs

@ -0,0 +1,37 @@
using LINGYUN.Abp.Saas.Editions;
using LINGYUN.Abp.Saas.Tenants;
using Riok.Mapperly.Abstractions;
using Volo.Abp.Mapperly;
namespace LINGYUN.Abp.Saas;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class TenantConnectionStringToTenantConnectionStringDtoMapper : MapperBase<TenantConnectionString, TenantConnectionStringDto>
{
public override partial TenantConnectionStringDto Map(TenantConnectionString source);
public override partial void Map(TenantConnectionString source, TenantConnectionStringDto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class TenantToTenantDtoMapper : MapperBase<Tenant, TenantDto>
{
[MapPropertyFromSource(nameof(TenantDto.EditionName), Use = nameof(TryGetEditionName))]
public override partial TenantDto Map(Tenant source);
[MapPropertyFromSource(nameof(TenantDto.EditionName), Use = nameof(TryGetEditionName))]
public override partial void Map(Tenant source, TenantDto destination);
private static string TryGetEditionName(Tenant source)
{
return source?.Edition?.DisplayName;
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
[MapExtraProperties]
public partial class EditionToEditionDtoMapper : MapperBase<Edition, EditionDto>
{
public override partial EditionDto Map(Edition source);
public override partial void Map(Edition source, EditionDto destination);
}

7
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Application/LINGYUN/Abp/Saas/AbpSaasApplicationModule.cs

@ -1,5 +1,4 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Modularity;
namespace LINGYUN.Abp.Saas;
@ -10,10 +9,6 @@ public class AbpSaasApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpSaasApplicationModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpSaasApplicationAutoMapperProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpSaasApplicationModule>();
}
}

2
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN.Abp.Saas.Domain.csproj

@ -14,7 +14,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.AutoMapper" />
<PackageReference Include="Volo.Abp.Mapperly" />
<PackageReference Include="Volo.Abp.Caching" />
<PackageReference Include="Volo.Abp.Ddd.Domain" />
<PackageReference Include="Volo.Abp.Features" />

77
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainMappers.cs

@ -0,0 +1,77 @@
using LINGYUN.Abp.MultiTenancy.Editions;
using LINGYUN.Abp.Saas.Editions;
using LINGYUN.Abp.Saas.Tenants;
using Riok.Mapperly.Abstractions;
using System;
using Volo.Abp.Data;
using Volo.Abp.Mapperly;
using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.Saas;
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EditionToEditionInfoMapper : MapperBase<Edition, EditionInfo>
{
public override partial EditionInfo Map(Edition source);
public override partial void Map(Edition source, EditionInfo destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class EditionToEditionEtoMapper : MapperBase<Edition, EditionEto>
{
public override partial EditionEto Map(Edition source);
public override partial void Map(Edition source, EditionEto destination);
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class TenantToTenantConfigurationMapper : MapperBase<Tenant, TenantConfiguration>
{
[MapPropertyFromSource(nameof(TenantConfiguration.ConnectionStrings), Use = nameof(TryGetConnectionStrings))]
[MapPropertyFromSource(nameof(TenantConfiguration.IsActive), Use = nameof(TryGetIsActive))]
public override partial TenantConfiguration Map(Tenant source);
[MapPropertyFromSource(nameof(TenantConfiguration.ConnectionStrings), Use = nameof(TryGetConnectionStrings))]
[MapPropertyFromSource(nameof(TenantConfiguration.IsActive), Use = nameof(TryGetIsActive))]
public override partial void Map(Tenant source, TenantConfiguration destination);
[UserMapping]
private static ConnectionStrings TryGetConnectionStrings(Tenant source)
{
var connStrings = new ConnectionStrings();
foreach (var connectionString in source.ConnectionStrings)
{
connStrings[connectionString.Name] = connectionString.Value;
}
return connStrings;
}
[UserMapping]
private static bool TryGetIsActive(Tenant source)
{
if (!source.IsActive)
{
return false;
}
// Injection IClock ?
if (source.EnableTime.HasValue && DateTime.Now < source.EnableTime)
{
return false;
}
if (source.DisableTime.HasValue && DateTime.Now > source.DisableTime)
{
return false;
}
return true;
}
}
[Mapper(RequiredMappingStrategy = RequiredMappingStrategy.Target)]
public partial class TenantToTenantEtoMapper : MapperBase<Tenant, TenantEto>
{
public override partial TenantEto Map(Tenant source);
public override partial void Map(Tenant source, TenantEto destination);
}

58
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainMappingProfile.cs

@ -1,58 +0,0 @@
using AutoMapper;
using LINGYUN.Abp.MultiTenancy.Editions;
using LINGYUN.Abp.Saas.Editions;
using LINGYUN.Abp.Saas.Tenants;
using System;
using Volo.Abp.Data;
using Volo.Abp.MultiTenancy;
namespace LINGYUN.Abp.Saas;
public class AbpSaasDomainMappingProfile : Profile
{
public AbpSaasDomainMappingProfile()
{
CreateMap<Edition, EditionInfo>();
CreateMap<Edition, EditionEto>();
CreateMap<Tenant, TenantConfiguration>()
.ForMember(ti => ti.ConnectionStrings, opts =>
{
opts.MapFrom((tenant, ti) =>
{
var connStrings = new ConnectionStrings();
foreach (var connectionString in tenant.ConnectionStrings)
{
connStrings[connectionString.Name] = connectionString.Value;
}
return connStrings;
});
})
.ForMember(ti => ti.IsActive, opts =>
{
opts.MapFrom((tenant, ti) =>
{
if (!tenant.IsActive)
{
return false;
}
// Injection IClock ?
if (tenant.EnableTime.HasValue && DateTime.Now < tenant.EnableTime)
{
return false;
}
if(tenant.DisableTime.HasValue && DateTime.Now > tenant.DisableTime)
{
return false;
}
return true;
});
});
CreateMap<Tenant, TenantEto>();
}
}

11
aspnet-core/modules/saas/LINGYUN.Abp.Saas.Domain/LINGYUN/Abp/Saas/AbpSaasDomainModule.cs

@ -3,9 +3,9 @@ using LINGYUN.Abp.Saas.Editions;
using LINGYUN.Abp.Saas.ObjectExtending;
using LINGYUN.Abp.Saas.Tenants;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AutoMapper;
using Volo.Abp.Domain;
using Volo.Abp.Domain.Entities.Events.Distributed;
using Volo.Abp.Mapperly;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending.Modularity;
using Volo.Abp.Threading;
@ -13,7 +13,7 @@ using Volo.Abp.Threading;
namespace LINGYUN.Abp.Saas;
[DependsOn(typeof(AbpSaasDomainSharedModule))]
[DependsOn(typeof(AbpAutoMapperModule))]
[DependsOn(typeof(AbpMapperlyModule))]
[DependsOn(typeof(AbpDddDomainModule))]
[DependsOn(typeof(AbpMultiTenancyEditionsModule))]
public class AbpSaasDomainModule : AbpModule
@ -22,12 +22,7 @@ public class AbpSaasDomainModule : AbpModule
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAutoMapperObjectMapper<AbpSaasDomainModule>();
Configure<AbpAutoMapperOptions>(options =>
{
options.AddProfile<AbpSaasDomainMappingProfile>(validate: true);
});
context.Services.AddMapperlyObjectMapper<AbpSaasDomainModule>();
Configure<AbpDistributedEntityEventOptions>(options =>
{

2
aspnet-core/modules/task-management/LINGYUN.Abp.BackgroundTasks/LINGYUN/Abp/BackgroundTasks/BackgroundWorkerAdapter.cs

@ -61,7 +61,7 @@ public class BackgroundWorkerAdapter<TWorker> : BackgroundWorkerBase, IBackgroun
var jobArgs = new Dictionary<string, object>
{
{ "JobType", workerType.AssemblyQualifiedName },
{ "JobType", workerType.AssemblyQualifiedName! },
};
return new JobInfo
{

13
aspnet-core/modules/task-management/LINGYUN.Abp.TaskManagement.Application/LINGYUN/Abp/TaskManagement/TaskManagementApplicationMapperProfile.cs

@ -1,13 +0,0 @@
using AutoMapper;
namespace LINGYUN.Abp.TaskManagement;
public class TaskManagementApplicationMapperProfile : Profile
{
public TaskManagementApplicationMapperProfile()
{
CreateMap<BackgroundJobInfo, BackgroundJobInfoDto>();
CreateMap<BackgroundJobLog, BackgroundJobLogDto>();
CreateMap<BackgroundJobAction, BackgroundJobActionDto>();
}
}

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save