mirror of https://github.com/abpframework/abp.git
20 changed files with 208 additions and 160 deletions
@ -1,22 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Docs.Admin.Documents; |
|||
using Volo.Docs.Admin.Projects; |
|||
using Volo.Docs.Documents; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs.Admin |
|||
{ |
|||
public class DocsAdminApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public DocsAdminApplicationAutoMapperProfile() |
|||
{ |
|||
CreateMap<Project, ProjectDto>(); |
|||
CreateMap<Document, DocumentDto>().Ignore(x => x.ProjectName); |
|||
CreateMap<DocumentWithoutContent, DocumentDto>(); |
|||
CreateMap<ProjectWithoutDetails, ProjectWithoutDetailsDto>(); |
|||
CreateMap<DocumentInfo, DocumentInfoDto>(); |
|||
CreateMap<ProjectPdfFile, ProjectPdfFileDto>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,57 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Docs.Admin.Documents; |
|||
using Volo.Docs.Admin.Projects; |
|||
using Volo.Docs.Documents; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs.Admin; |
|||
|
|||
[Mapper] |
|||
public partial class ProjectPdfFileToProjectPdfFileDtoMapper : MapperBase<ProjectPdfFile, ProjectPdfFileDto> |
|||
{ |
|||
public override partial ProjectPdfFileDto Map(ProjectPdfFile source); |
|||
|
|||
public override partial void Map(ProjectPdfFile source, ProjectPdfFileDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentInfoToDocumentInfoDtoMapper : MapperBase<DocumentInfo, DocumentInfoDto> |
|||
{ |
|||
public override partial DocumentInfoDto Map(DocumentInfo source); |
|||
|
|||
public override partial void Map(DocumentInfo source, DocumentInfoDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class ProjectWithoutDetailsToProjectWithoutDetailsDtoMapper : MapperBase<ProjectWithoutDetails, ProjectWithoutDetailsDto> |
|||
{ |
|||
public override partial ProjectWithoutDetailsDto Map(ProjectWithoutDetails source); |
|||
|
|||
public override partial void Map(ProjectWithoutDetails source, ProjectWithoutDetailsDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentWithoutContentToDocumentDtoMapper : MapperBase<DocumentWithoutContent, DocumentDto> |
|||
{ |
|||
public override partial DocumentDto Map(DocumentWithoutContent source); |
|||
|
|||
public override partial void Map(DocumentWithoutContent source, DocumentDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentToDocumentDtoMapper : MapperBase<Document, DocumentDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(DocumentDto.ProjectName))] |
|||
public override partial DocumentDto Map(Document source); |
|||
|
|||
public override partial void Map(Document source, DocumentDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class ProjectToProjectDtoMapper : MapperBase<Project, ProjectDto> |
|||
{ |
|||
public override partial ProjectDto Map(Project source); |
|||
|
|||
public override partial void Map(Project source, ProjectDto destination); |
|||
} |
|||
@ -1,30 +0,0 @@ |
|||
using AutoMapper; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Docs.Admin.Documents; |
|||
using Volo.Docs.Admin.Pages.Docs.Admin.Projects; |
|||
using Volo.Docs.Admin.Projects; |
|||
|
|||
namespace Volo.Docs.Admin |
|||
{ |
|||
public class DocsAdminWebAutoMapperProfile : Profile |
|||
{ |
|||
public DocsAdminWebAutoMapperProfile() |
|||
{ |
|||
CreateMap<CreateModel.CreateGithubProjectViewModel, CreateProjectDto>() |
|||
.Ignore(x => x.ExtraProperties); |
|||
|
|||
CreateMap<EditModel.EditGithubProjectViewModel, UpdateProjectDto>() |
|||
.Ignore(x => x.ExtraProperties); |
|||
|
|||
CreateMap<ProjectDto, EditModel.EditGithubProjectViewModel > () |
|||
.Ignore(x => x.GitHubAccessToken) |
|||
.Ignore(x => x.GitHubRootUrl) |
|||
.Ignore(x => x.GitHubUserAgent) |
|||
.Ignore(x => x.GithubVersionProviderSource) |
|||
.Ignore(x => x.VersionBranchPrefix); |
|||
|
|||
CreateMap<PullModel.PullDocumentViewModel, PullAllDocumentInput>(); |
|||
CreateMap<PullModel.PullDocumentViewModel, PullDocumentInput>(); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,55 @@ |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Docs.Admin.Documents; |
|||
using Volo.Docs.Admin.Pages.Docs.Admin.Projects; |
|||
using Volo.Docs.Admin.Projects; |
|||
|
|||
namespace Volo.Docs.Admin; |
|||
|
|||
[Mapper] |
|||
public partial class PullDocumentViewModelToPullAllDocumentInputMapper : MapperBase<PullModel.PullDocumentViewModel, PullAllDocumentInput> |
|||
{ |
|||
public override partial PullAllDocumentInput Map(PullModel.PullDocumentViewModel source); |
|||
|
|||
public override partial void Map(PullModel.PullDocumentViewModel source, PullAllDocumentInput destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class PullDocumentViewModelToPullDocumentInputMapper : MapperBase<PullModel.PullDocumentViewModel, PullDocumentInput> |
|||
{ |
|||
public override partial PullDocumentInput Map(PullModel.PullDocumentViewModel source); |
|||
|
|||
public override partial void Map(PullModel.PullDocumentViewModel source, PullDocumentInput destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class ProjectDtoToEditGithubProjectViewModelMapper : MapperBase<ProjectDto, EditModel.EditGithubProjectViewModel> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubAccessToken))] |
|||
[MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubRootUrl))] |
|||
[MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GitHubUserAgent))] |
|||
[MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.GithubVersionProviderSource))] |
|||
[MapperIgnoreTarget(nameof(EditModel.EditGithubProjectViewModel.VersionBranchPrefix))] |
|||
public override partial EditModel.EditGithubProjectViewModel Map(ProjectDto source); |
|||
|
|||
public override partial void Map(ProjectDto source, EditModel.EditGithubProjectViewModel destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class CreateGithubProjectViewModelToCreateProjectDtoMapper : MapperBase<CreateModel.CreateGithubProjectViewModel, CreateProjectDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(CreateProjectDto.ExtraProperties))] |
|||
public override partial CreateProjectDto Map(CreateModel.CreateGithubProjectViewModel source); |
|||
|
|||
public override partial void Map(CreateModel.CreateGithubProjectViewModel source, CreateProjectDto destination); |
|||
} |
|||
|
|||
|
|||
[Mapper] |
|||
public partial class EditGithubProjectViewModelToUpdateProjectDtoMyClassMapper : MapperBase<EditModel.EditGithubProjectViewModel, UpdateProjectDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(UpdateProjectDto.ExtraProperties))] |
|||
public override partial UpdateProjectDto Map(EditModel.EditGithubProjectViewModel source); |
|||
|
|||
public override partial void Map(EditModel.EditGithubProjectViewModel source, UpdateProjectDto destination); |
|||
} |
|||
@ -1,20 +1,49 @@ |
|||
using AutoMapper; |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Docs.Documents; |
|||
using Volo.Abp.AutoMapper; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Docs.Common.Projects; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs |
|||
namespace Volo.Docs; |
|||
|
|||
[Mapper] |
|||
public partial class DocumentResourceToDocumentResourceDtoMapper : MapperBase<DocumentResource, DocumentResourceDto> |
|||
{ |
|||
public class DocsApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public DocsApplicationAutoMapperProfile() |
|||
{ |
|||
CreateMap<Project, ProjectDto>(); |
|||
CreateMap<VersionInfo, VersionInfoDto>(); |
|||
CreateMap<Document, DocumentWithDetailsDto>().Ignore(x => x.Project).Ignore(x => x.Contributors); |
|||
CreateMap<DocumentContributor, DocumentContributorDto>(); |
|||
CreateMap<DocumentResource, DocumentResourceDto>(); |
|||
} |
|||
} |
|||
public override partial DocumentResourceDto Map(DocumentResource source); |
|||
|
|||
public override partial void Map(DocumentResource source, DocumentResourceDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentContributorToDocumentContributorDtoMapper : MapperBase<DocumentContributor, DocumentContributorDto> |
|||
{ |
|||
public override partial DocumentContributorDto Map(DocumentContributor source); |
|||
|
|||
public override partial void Map(DocumentContributor source, DocumentContributorDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class VersionInfoToVersionInfoDtoMapper : MapperBase<VersionInfo, VersionInfoDto> |
|||
{ |
|||
public override partial VersionInfoDto Map(VersionInfo source); |
|||
|
|||
public override partial void Map(VersionInfo source, VersionInfoDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class ProjectToProjectDtoMapper : MapperBase<Project, ProjectDto> |
|||
{ |
|||
public override partial ProjectDto Map(Project source); |
|||
|
|||
public override partial void Map(Project source, ProjectDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentToDocumentWithDetailsDtoMapper : MapperBase<Document, DocumentWithDetailsDto> |
|||
{ |
|||
[MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Project))] |
|||
[MapperIgnoreTarget(nameof(DocumentWithDetailsDto.Contributors))] |
|||
public override partial DocumentWithDetailsDto Map(Document source); |
|||
|
|||
public override partial void Map(Document source, DocumentWithDetailsDto destination); |
|||
} |
|||
@ -1,15 +1,22 @@ |
|||
using AutoMapper; |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Docs.Common.Projects; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs.Common |
|||
namespace Volo.Docs.Common; |
|||
|
|||
[Mapper] |
|||
public partial class ProjectToProjectDtoMapper : MapperBase<Project, ProjectDto> |
|||
{ |
|||
public override partial ProjectDto Map(Project source); |
|||
|
|||
public override partial void Map(Project source, ProjectDto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class VersionInfoToVersionInfoDtoMapper : MapperBase<VersionInfo, VersionInfoDto> |
|||
{ |
|||
public class DocsCommonApplicationAutoMapperProfile : Profile |
|||
{ |
|||
public DocsCommonApplicationAutoMapperProfile() |
|||
{ |
|||
CreateMap<Project, ProjectDto>(); |
|||
CreateMap<VersionInfo, VersionInfoDto>(); |
|||
} |
|||
} |
|||
public override partial VersionInfoDto Map(VersionInfo source); |
|||
|
|||
public override partial void Map(VersionInfo source, VersionInfoDto destination); |
|||
} |
|||
|
|||
@ -1,15 +1,22 @@ |
|||
using AutoMapper; |
|||
using Riok.Mapperly.Abstractions; |
|||
using Volo.Abp.Mapperly; |
|||
using Volo.Docs.Documents; |
|||
using Volo.Docs.Projects; |
|||
|
|||
namespace Volo.Docs |
|||
namespace Volo.Docs; |
|||
|
|||
[Mapper] |
|||
public partial class ProjectToProjectEtoMapper : MapperBase<Project, ProjectEto> |
|||
{ |
|||
public class DocsDomainMappingProfile : Profile |
|||
{ |
|||
public DocsDomainMappingProfile() |
|||
{ |
|||
CreateMap<Document, DocumentEto>(); |
|||
CreateMap<Project, ProjectEto>(); |
|||
} |
|||
} |
|||
public override partial ProjectEto Map(Project source); |
|||
|
|||
public override partial void Map(Project source, ProjectEto destination); |
|||
} |
|||
|
|||
[Mapper] |
|||
public partial class DocumentToDocumentEtoMapper : MapperBase<Document, DocumentEto> |
|||
{ |
|||
public override partial DocumentEto Map(Document source); |
|||
|
|||
public override partial void Map(Document source, DocumentEto destination); |
|||
} |
|||
@ -1,11 +0,0 @@ |
|||
using AutoMapper; |
|||
|
|||
namespace Volo.Docs |
|||
{ |
|||
public class DocsWebAutoMapperProfile : Profile |
|||
{ |
|||
public DocsWebAutoMapperProfile() |
|||
{ |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue