private static List <CodeTemplateInfo> CreateCodeTemplates() { BasicOptionCfg option = Global.Option; EntityModel entity = Global.Entity; SolutionInfoModel solutionInfo = Global.SolutionInfo; string directoryName = Path.GetDirectoryName(typeof(CommonConsts).Assembly.Location); string directoryName2 = Path.GetDirectoryName(Global.SolutionInfo.CurrentSelectFilePath); string text = string.Empty; string str = directoryName2.Split(new char[] { '\\', '/' }, StringSplitOptions.RemoveEmptyEntries).LastOrDefault <string>(); string uiParentDirName = string.Join("-", str.ConvertLowerSplitArray()); if (directoryName2.StartsWith(Global.SolutionInfo.Application.BasePath)) { text = directoryName2.Replace(Global.SolutionInfo.Application.BasePath + "\\", string.Empty); } if (directoryName2.StartsWith(Global.SolutionInfo.Core.BasePath)) { text = directoryName2.Replace(Global.SolutionInfo.Core.BasePath + "\\", string.Empty); } if (directoryName2.StartsWith(Global.SolutionInfo.EF.BasePath)) { text = directoryName2.Replace(Global.SolutionInfo.EF.BasePath + "\\", string.Empty); } if (option.IsAbpZero) { if (directoryName2.StartsWith(Global.SolutionInfo.Application_Shared.BasePath)) { text = directoryName2.Replace(Global.SolutionInfo.Application_Shared.BasePath + "\\", string.Empty); } if (directoryName2.StartsWith(Global.SolutionInfo.Core_Shared.BasePath)) { text = directoryName2.Replace(Global.SolutionInfo.Core_Shared.BasePath + "\\", string.Empty); } } string.IsNullOrWhiteSpace(text); CodeGenDto codeGenDto = new CodeGenDto(); codeGenDto.EntityDir = text; codeGenDto.TemplateBasePath = directoryName; codeGenDto.option = option; codeGenDto.UiParentDirName = uiParentDirName; codeGenDto.Entity = entity; codeGenDto.solutionInfoModel = solutionInfo; if (Global.MainViewModel.MainExtendedCfg.IsXstSolution) { return(CodeGen.GetMoonsXStCodeTemplates(codeGenDto)); } return(CodeGen.Get52abpDefaultCodeTemplates(codeGenDto)); }
private void Next_Click(object sender, RoutedEventArgs e) { BasicOptionCfg option = Global.Option; if (!option.HasChecked()) { "请至少选择一项!".WaringMsg(); return; } base.Visibility = Visibility.Hidden; if (option.DoWithoutSelectProperty()) { this.StartCodeGen(); return; } if (option.IsAllGeneratorCode || option.UseApplicationServiceCode) { Global.PropertyViewModel.OnlyShowEditAndListDtoCheckbox(Global.Option.UseNgZorro); } new PropertySelectorWindow(delegate(CallBackTypeEnum backType) { switch (backType) { case CallBackTypeEnum.Default: break; case CallBackTypeEnum.Prev: base.Visibility = Visibility.Visible; return; case CallBackTypeEnum.Cancel: base.Close(); return; case CallBackTypeEnum.Enter: this.StartCodeGen(); break; default: return; } }).Show(); }
public static GeneratorCodeReplaceInfo Create(SolutionInfoModel solutionInfo, BasicOptionCfg option, EntityModel entity) { GeneratorCodeReplaceInfo generatorCodeReplaceInfo = new GeneratorCodeReplaceInfo(); generatorCodeReplaceInfo.Multi_Language = new List <TranslatorTextList>(); generatorCodeReplaceInfo.SolutionNamespace = solutionInfo.SolutionNamespace; generatorCodeReplaceInfo.CompanyNamespace = solutionInfo.CompanyNamespace; generatorCodeReplaceInfo.BaseClassDtoReplacement = ": " + entity.BaseClassDtoName; if (generatorCodeReplaceInfo.BaseClassDtoReplacement == ": ") { generatorCodeReplaceInfo.BaseClassDtoReplacement = string.Empty; } else if (!string.IsNullOrEmpty(entity.BaseClassNameList)) { generatorCodeReplaceInfo.BaseClassDtoReplacement = generatorCodeReplaceInfo.BaseClassDtoReplacement + "," + entity.BaseClassNameList; } if (option.UseDomainManagerCode || option.IsAllGeneratorCode) { generatorCodeReplaceInfo.DomainServicesNamespace = "using " + entity.Namespace + ".DomainService;"; generatorCodeReplaceInfo.PrivateIEntityNameManager = string.Concat(new string[] { "private readonly I", entity.Name, "Manager _", entity.LowerName, "Manager;" }); generatorCodeReplaceInfo.IEntityNameManager = string.Concat(new string[] { ",I", entity.Name, "Manager ", entity.LowerName, "Manager" }); generatorCodeReplaceInfo.EntityNameManager = string.Concat(new string[] { "_", entity.LowerName, "Manager = ", entity.LowerName, "Manager;" }); } if (option.UseDomainAuthorizeCode || option.IsAllGeneratorCode) { generatorCodeReplaceInfo.DomainAuthorizationNamespace = "using " + entity.Namespace + ".Authorization;"; generatorCodeReplaceInfo.PermissionNode = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Node)]" }); generatorCodeReplaceInfo.PermissionQuery = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Query)]" }); generatorCodeReplaceInfo.PermissionCreate = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Create)]" }); generatorCodeReplaceInfo.PermissionEdit = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Edit)]" }); generatorCodeReplaceInfo.PermissionDelete = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Delete)]" }); generatorCodeReplaceInfo.PermissionBatchDelete = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "BatchDelete)]" }); generatorCodeReplaceInfo.PermissionExportExcel = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "ExportExcel)]" }); generatorCodeReplaceInfo.EntityCreateOrEditPermission = string.Concat(new string[] { "[AbpAuthorize(", entity.Name, "Permissions.", "Create, ", entity.Name, "Permissions.", "Edit)]" }); } return(generatorCodeReplaceInfo); }
private static List <CodeTemplateInfo> Get52abpDefaultCodeTemplates(CodeGenDto dto) { List <CodeTemplateInfo> list = new List <CodeTemplateInfo>(); BasicOptionCfg option = dto.option; string entityDir = dto.EntityDir; string templateBasePath = dto.TemplateBasePath; EntityModel entity = dto.Entity; string uiParentDirName = dto.UiParentDirName; SolutionInfoModel solutionInfoModel = dto.solutionInfoModel; if (option.IsAllGeneratorCode || option.UseApplicationServiceCode) { string basePath = Global.SolutionInfo.Application.BasePath; string buildPath = Path.Combine(basePath, entityDir, "Mapper", entity.Name + "DtoAutoMapper.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Mapper\\EntityDtoAutoMapper.txt"), buildPath)); if (option.UseExportExcel) { buildPath = Path.Combine(basePath, entityDir, "Exporting", "I" + entity.Name + "ListExcelExporter.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Exporting\\IEntityListExcelExporter.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Exporting", entity.Name + "ListExcelExporter.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Exporting\\EntityListExcelExporter.txt"), buildPath)); } buildPath = Path.Combine(basePath, entityDir, "I" + entity.Name + "AppService.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\IEntityApplicationService.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, entity.Name + "AppService.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\EntityApplicationService.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", "CreateOrUpdate" + entity.Name + "Input.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Dtos\\CreateOrUpdateEntityInput.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", "Get" + entity.Name + "ForEditOutput.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Dtos\\GetEntityForEditOutput.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", "Get" + entity.Name + "sInput.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Dtos\\GetEntitysInput.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", entity.Name + "EditDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Dtos\\EntityEditDto.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", entity.Name + "ListDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Application\\Dtos\\EntityListDto.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Readme.md"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Readme.txt"), buildPath)); if (option.UseNgZorro) { buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "Readme.md" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\Readme.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.less" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityEditViewCss.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.html" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityEditViewHtml.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.ts" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityEditViewTs.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.less" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityListViewCss.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.html" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityListViewHtml.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.ts" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Client\\NGZorro\\EntityListViewTs.txt"), buildPath)); } } if (option.IsAllGeneratorCode || option.UseDomainAuthorizeCode || option.UseDomainManagerCode) { string basePath2 = Global.SolutionInfo.Core.BasePath; string buildPath2 = string.Empty; if (option.UseDomainAuthorizeCode) { buildPath2 = Path.Combine(basePath2, entityDir, "Authorization", entity.Name + "AuthorizationProvider.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Domain\\Authorization\\EntityAuthorizationProvider.txt"), buildPath2)); buildPath2 = Path.Combine(basePath2, entityDir, "Authorization", entity.Name + "Permissions.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Domain\\Authorization\\EntityPermissions.txt"), buildPath2)); } if (option.UseDomainManagerCode) { buildPath2 = Path.Combine(basePath2, entityDir, "DomainService", "I" + entity.Name + "Manager.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Domain\\DomainService\\IEntityManager.txt"), buildPath2)); buildPath2 = Path.Combine(basePath2, entityDir, "DomainService", entity.Name + "Manager.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Domain\\DomainService\\EntityManager.txt"), buildPath2)); buildPath2 = Path.Combine(basePath2, entityDir, "Duoyuyan.md"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Domain\\Duoyuyan.txt"), buildPath2)); } buildPath2 = Path.Combine(basePath2, entityDir, "Readme.md"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Readme.txt"), buildPath2)); } string buildPath3 = Path.Combine(Global.SolutionInfo.EF.BasePath, "EntityMapper", entity.Name + "s", entity.Name + "Cfg.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\EntityFrameworkCore\\EntityMapper\\EntityCfg.txt"), buildPath3)); if (option.UseXUnitTests) { string buildPath4 = Path.Combine(Global.SolutionInfo.Tests.BasePath, entity.Name + "s", entity.Name + "AppService_Tests.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\Tests\\EntityAppService_Tests.txt"), buildPath4)); } if (option.InitGeneratorCode) { string basePath3 = Global.SolutionInfo.Application.BasePath; string buildPath5 = Path.Combine(basePath3, "Dtos", "PagedAndFilteredInputDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\Dtos\\PagedAndFilteredInputDto.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, "Dtos", "PagedAndSortedInputDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\Dtos\\PagedAndSortedInputDto.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, "Dtos", "PagedInputDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\Dtos\\PagedInputDto.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, "Dtos", "PagedSortedAndFilteredInputDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\Dtos\\PagedSortedAndFilteredInputDto.txt"), buildPath5)); basePath3 = Global.SolutionInfo.Core.BasePath; buildPath5 = Path.Combine(basePath3, "Authorization", "AppLtmPermissions.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\AppLtmPermissions.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, solutionInfoModel.SolutionNamespace + "DomainServiceBase.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\SolutionNameDomainServiceBase.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, "AppLtmConsts.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\AppLtmConsts.txt"), buildPath5)); buildPath5 = Path.Combine(basePath3, "YoYoAbpefCoreConsts.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Server\\InitGeneratorCode\\YoYoAbpefCoreConsts.txt"), buildPath5)); } return(list); }
private static List <CodeTemplateInfo> GetMoonsXStCodeTemplates(CodeGenDto dto) { List <CodeTemplateInfo> list = new List <CodeTemplateInfo>(); BasicOptionCfg option = dto.option; string entityDir = dto.EntityDir; string templateBasePath = dto.TemplateBasePath; EntityModel entity = dto.Entity; string uiParentDirName = dto.UiParentDirName; SolutionInfoModel solutionInfoModel = dto.solutionInfoModel; if (option.IsAllGeneratorCode || option.UseApplicationServiceCode) { string basePath = Global.SolutionInfo.Application_Shared.BasePath; string buildPath = Path.Combine(basePath, entityDir, "I" + entity.Name + "AppService.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\IEntityApplicationService.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", "Get" + entity.Name + "ForEditOutput.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\Dtos\\GetEntityForEditOutput.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", entity.Name + "EditDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\Dtos\\EntityEditDto.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Dtos", "Get" + entity.Name + "ForViewDto.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\Dtos\\GetEntityForViewDto.txt"), buildPath)); basePath = Global.SolutionInfo.Application.BasePath; buildPath = Path.Combine(basePath, entityDir, "Mapper", entity.Name + "DtoAutoMapper.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\Mapper\\EntityDtoAutoMapper.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, entity.Name + "AppService.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Application\\EntityApplicationService.txt"), buildPath)); buildPath = Path.Combine(basePath, entityDir, "Readme.md"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Readme.txt"), buildPath)); basePath = Global.SolutionInfo.Host.BasePath; buildPath = Path.Combine(new string[] { basePath, "wwwroot", "ConfigFiles", "ListViews", entity.ParentDirName + "." + entity.Name + ".xml" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\WebHost\\wwwroot\\EntityListViews.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, "wwwroot", "ConfigFiles", "PageFilters", entity.ParentDirName + "." + entity.Name + ".json" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\WebHost\\wwwroot\\PageFilters.txt"), buildPath)); if (!option.IsAbpZero && option.UseNgZorro) { buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "Readme.md" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\Readme.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.less" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityEditViewCss.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.html" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityEditViewHtml.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, "create-or-edit-" + entity.SplitName, "create-or-edit-" + entity.SplitName + ".component.ts" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityEditViewTs.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.less" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Client, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityListViewCss.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.html" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityListViewHtml.txt"), buildPath)); buildPath = Path.Combine(new string[] { basePath, entityDir, "Client", "NGZorro", uiParentDirName, entity.SplitName + ".component.ts" }); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Client\\NGZorro\\EntityListViewTs.txt"), buildPath)); } } if (option.IsAllGeneratorCode || option.UseDomainAuthorizeCode || option.UseDomainManagerCode) { string basePath2 = Global.SolutionInfo.Core.BasePath; string buildPath2 = string.Empty; if (option.UseDomainAuthorizeCode) { buildPath2 = Path.Combine(basePath2, entityDir, "Authorization", entity.Name + "Permissions.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Domain\\Authorization\\EntityPermissions.txt"), buildPath2)); } if (option.UseDomainManagerCode) { buildPath2 = Path.Combine(basePath2, entityDir, "DomainService", "I" + entity.Name + "Manager.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Domain\\DomainService\\IEntityManager.txt"), buildPath2)); buildPath2 = Path.Combine(basePath2, entityDir, "DomainService", entity.Name + "Manager.cs"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Domain\\DomainService\\EntityManager.txt"), buildPath2)); } buildPath2 = Path.Combine(basePath2, entityDir, "Readme.md"); list.Add(CodeTemplateInfo.Create(CodeTemplateType.Server, Path.Combine(templateBasePath, "Templates\\Moons\\Server\\Readme.txt"), buildPath2)); } return(list); }