static void Main(string[] args) { //var allTables = new ToolsService().GetAllTables(); //foreach (var table in allTables) //{ // if (table == "Biz_ContractItem_Sub_Certificate") // { // Console.Write($"生成[{ table }]表 模型: "); // Console.WriteLine(new ToolsService().CreateModels("..\\..\\..\\..\\TaiheSystem.CBE.Api.Model\\Entity", "TaiheSystem.CBE.Api.Model", table, "")); // Console.Write($"生成[{ table }]表 服务: "); // Console.WriteLine(new ToolsService().CreateServices("..\\..\\..\\..\\TaiheSystem.CBE.Api.Interfaces\\Service", "TaiheSystem.CBE.Api.Interfaces", table)); // Console.Write($"生成[{ table }]表 接口: "); // Console.WriteLine(new ToolsService().CreateIServices("..\\..\\..\\..\\TaiheSystem.CBE.Api.Interfaces\\IService", "TaiheSystem.CBE.Api.Interfaces", table)); // } //} var allVM = new ToolsService().GetAllViews("view_ItemCert"); foreach (var view in allVM) { Console.Write($"生成[{ view }]表 模型: "); Console.WriteLine(new ToolsService().CreateModels("..\\..\\..\\..\\TaiheSystem.CBE.Api.Model\\View\\Evaluation", "TaiheSystem.CBE.Api.Model", view, "")); Console.Write($"生成[{ view }]表 服务: "); Console.WriteLine(new ToolsService().CreateServices("..\\..\\..\\..\\TaiheSystem.CBE.Api.Interfaces\\Service", "TaiheSystem.CBE.Api.Interfaces", view)); Console.Write($"生成[{ view }]表 接口: "); Console.WriteLine(new ToolsService().CreateIServices("..\\..\\..\\..\\TaiheSystem.CBE.Api.Interfaces\\IService", "TaiheSystem.CBE.Api.Interfaces", view)); } Console.Write($"生成DbContext: "); Console.WriteLine(new ToolsService().CreateDbContext("..\\..\\..\\..\\TaiheSystem.CBE.Api.Core\\DbContext.cs", "TaiheSystem.CBE.Api.Core")); Console.ReadKey(); }
public ResultSrv <List <ServiceBillSrv> > GetPayedBillList() { try { var output = new ResultSrv <List <ServiceBillSrv> >(); var payedBillListVo = PayedBillListVo.ConcreteBuilder .SetServiceCallParameters(internalServiceCallVo) .SetOffset(0) .SetSize(10) //.SetBillId("") //.SetPaymentId("") .SetId(0) //.SetFromDate("") //.SetToDate("") .Build(); ToolsService.GetPayedBillList(payedBillListVo, response => Listener.GetResult(response, out output)); return(output); } catch (PodException podException) { Console.WriteLine( $"-- {podException.Code}-an error has occured : {Environment.NewLine}{podException.Message}"); throw; } catch (Exception exception) { Console.WriteLine(exception.Message); throw; } }
public CommandHandler( DiscordSocketClient client, CommandService commands, IServiceProvider service, DataService data, LogHandler log, ToolsService toolsService) { Console.WriteLine("Setting up CommandHandler..."); _commands = commands; _client = client; _service = service; _dataService = data; _log = log; _toolsService = toolsService; _prefix = _dataService.RSettings.ProgramSettings.CommandPrefix[0]; _prefixStrings = new[] { "okay ido, ", "<:botido:592644736029032448> " }; }
static void Main(string[] args) { var tables = new ToolsService().GetAllTables(); foreach (var table in tables) { //Console.Write($"生成[{ table }]表 模型: "); //Console.WriteLine(new ToolsService().CreateModels("..\\..\\..\\..\\CTrip.System.Model\\Entity", "CTrip.System.Model", table, "")); Console.Write($"生成[{ table }]表 服务: "); Console.WriteLine(new ToolsService().CreateServices("..\\..\\..\\..\\CTrip.System.Interfaces\\Service", "CTrip.System.Interfaces", table)); Console.Write($"生成[{ table }]表 接口: "); Console.WriteLine(new ToolsService().CreateIServices("..\\..\\..\\..\\CTrip.System.Interfaces\\IService", "CTrip.System.Interfaces", table)); } Console.Write($"生成DbContext: "); Console.WriteLine(new ToolsService().CreateDbContext("..\\..\\..\\..\\CTrip.System.Core\\DbContext.cs", "CTrip.System.Core")); Console.ReadKey(); }
public static int Main(string[] args) { var app = new CommandLineApplication { Name = "SonOfPicasso Tools", Description = "Utility to help develop on SonOfPicasso", }; app.HelpOption(inherited: true); app.Command("images", configCmd => { configCmd.HandleSpecifySubCommandError(); configCmd.Command("generate", setCmd => { setCmd.Description = "Generate Images"; setCmd.HandleValidationError(); var count = setCmd.Argument <int>("count", "The number of images to generate").IsRequired(); var path = setCmd.Argument <string>("path", "The location for these images").IsRequired(); setCmd.OnExecute(() => ToolsService.GenerateImages(count.ParsedValue, path.ParsedValue).LastAsync().Wait()); }); }); app.Command("cache", configCmd => { configCmd.HandleSpecifySubCommandError(); configCmd.Command("clear", setCmd => { setCmd.Description = "Clear Cache"; setCmd.HandleValidationError(); setCmd.OnExecute(() => ToolsService.ClearCache().LastAsync().Wait()); }); }); app.HandleSpecifySubCommandError(); return(app.Execute(args)); }
public static void Execute() { var allTables = new ToolsService().GetAllTables(); var solutionName = "Meiam.System"; foreach (var table in allTables) { Console.Write($"生成[{ table }]表 模型: "); Console.WriteLine(new ToolsService().CreateModels($"..\\..\\..\\..\\{ solutionName }.Model\\Entity", solutionName, table, "")); Console.Write($"生成[{ table }]表 服务: "); Console.WriteLine(new ToolsService().CreateServices($"..\\..\\..\\..\\{ solutionName }.Interfaces\\Service", solutionName, table)); Console.Write($"生成[{ table }]表 接口: "); Console.WriteLine(new ToolsService().CreateIServices($"..\\..\\..\\..\\{ solutionName }.Interfaces\\IService", solutionName, table)); } //Console.Write($"生成DbContext: "); //Console.WriteLine(new ToolsService().CreateDbContext($"..\\..\\..\\..\\{ solutionName }.Core\\DbContext.cs", solutionName)); }
public UtilitiesModule(LogHandler log, DataService dataService, ToolsService toolsService) { _log = log; _dataService = dataService; _toolsService = toolsService; }
public ToolsController(ToolsService toolsService, IOptions <SearchIndexSettings> settings) { _toolsService = toolsService; _settings = settings.Value; }