121 changed files with 1419 additions and 968 deletions
@ -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); |
|||
} |
|||
|
|||
@ -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); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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, |
|||
}; |
|||
} |
|||
} |
|||
@ -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, |
|||
}; |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
|
|||
@ -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); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace LINGYUN.Abp.Demo; |
|||
public class DemoDomainMapperProfile : Profile |
|||
{ |
|||
public DemoDomainMapperProfile() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace LINGYUN.Abp.Gdpr; |
|||
public class GdprApplicationMapperProfile : Profile |
|||
{ |
|||
public GdprApplicationMapperProfile() |
|||
{ |
|||
CreateMap<GdprRequest, GdprRequestDto>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -1,10 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace LINGYUN.Abp.Gdpr; |
|||
public class GdprDomainMapperProfile : Profile |
|||
{ |
|||
public GdprDomainMapperProfile() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -1,12 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.Identity; |
|||
|
|||
namespace LINGYUN.Abp.Identity; |
|||
|
|||
public class IdentityDomainMappingProfile : Profile |
|||
{ |
|||
public IdentityDomainMappingProfile() |
|||
{ |
|||
CreateMap<IdentitySession, IdentitySessionEto>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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,12 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace LINGYUN.Abp.LocalizationManagement; |
|||
|
|||
public class LocalizationManagementApplicationMapperProfile : Profile |
|||
{ |
|||
public LocalizationManagementApplicationMapperProfile() |
|||
{ |
|||
CreateMap<Language, LanguageDto>(); |
|||
CreateMap<Resource, ResourceDto>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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); |
|||
} |
|||
|
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -0,0 +1,3 @@ |
|||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd"> |
|||
<ConfigureAwait /> |
|||
</Weavers> |
|||
@ -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> |
|||
@ -1,10 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace LINGYUN.Abp.MessageService; |
|||
|
|||
public class AbpMessageServiceApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public AbpMessageServiceApplicationAutoMapperProfile() |
|||
{ |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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(); |
|||
})); |
|||
} |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
@ -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(); |
|||
} |
|||
} |
|||
@ -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); |
|||
} |
|||
|
|||
@ -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); |
|||
} |
|||
@ -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>(); |
|||
} |
|||
} |
|||
@ -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…
Reference in new issue