public ItemToTemplateCommand() { Text = "Copy to template..."; SortingValue = 1000; _fileService = new TemplateFileService(); _templateEngineService = new TemplateEngineService(); }
public CodeGenerateUseMustachioService(ITemplateEngineService templateEngine, IConfiguration config, IHostEnvironment env) { _templateEngine = templateEngine; _config = config; _env = env; if (!_env.IsDevelopment()) { throw new Exception("代码生成服务只支持在开发环境下使用"); } var domainDir = AppDomain.CurrentDomain.BaseDirectory; //C:\WorkSpace\GitHub\MyRepositoryNetCore\MyNetCore.Web\bin\Debug\net5.0\ _solutionWebDirectory = domainDir.Substring(0, domainDir.LastIndexOf("\\bin")); //C:\WorkSpace\GitHub\MyRepositoryNetCore\MyNetCore.Web }
public CodeGenerateUseRazorService(ITemplateEngineService templateEngine, IConfiguration config) { _templateEngine = templateEngine; _config = config; }