添加rabc项目模块

This commit is contained in:
橙子
2023-01-29 21:13:20 +08:00
parent d6565bd2d9
commit bb8508abbd
38 changed files with 772 additions and 26 deletions

View File

@@ -14,38 +14,38 @@ TemplateFactory templateFactory = new();
//string modelName = "Exhibition";
//string nameSpaces = "Yi.BBS";
//List<string> entityNames = new() { "Banner" };
string modelName = "Forum";
string nameSpaces = "Yi.BBS";
List<string> entityNames = new() { "_" };
//string modelName = "Forum";
//string nameSpaces = "Yi.BBS";
//List<string> entityNames = new() { "_" };
foreach (var entityName in entityNames)
{
templateFactory.CreateTemplateProviders((option) =>
{
option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
//foreach (var entityName in entityNames)
//{
// templateFactory.CreateTemplateProviders((option) =>
// {
// option.Add(new ServiceTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new IServiceTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new CreateInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new UpdateInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetListInputVoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetListOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new GetOutputDtoTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
//option.Add(new ApiTemplateProvider(modelName, entityName));
});
//开始构建模板
templateFactory.BuildTemplate();
Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
}
// option.Add(new ConstTemplateProvider(modelName, entityName, nameSpaces));
// option.Add(new ProfileTemplateProvider(modelName, entityName, nameSpaces));
// //option.Add(new ApiTemplateProvider(modelName, entityName));
// });
// //开始构建模板
// templateFactory.BuildTemplate();
// Console.WriteLine($"Yi.Framework.Template:{entityName}构建完成!");
//}
Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
Console.ReadKey();
//Console.WriteLine("Yi.Framework.Template:模板全部生成完成!");
//Console.ReadKey();
//根据模板文件生成项目文件
//var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\template";
//FileHelper.AllInfoReplace(template, "Template", "RBAC");
var template = "D:\\C#\\Yi\\Yi.Framework.Net6\\src\\project\\rbac";
FileHelper.AllInfoReplace(template, "Template", "RBAC");