using clauses cleanup
This commit is contained in:
parent
1868ed86e5
commit
7f03dd7272
292 changed files with 91 additions and 685 deletions
|
|
@ -3,7 +3,6 @@ using cli.Model;
|
|||
using cli.Services;
|
||||
using cli.Settings;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
|
|
@ -44,7 +43,7 @@ namespace cli.Commands
|
|||
config.HelpOption("-? | -h | --help");
|
||||
});
|
||||
cmd.OnExecute(() => {
|
||||
|
||||
|
||||
var logger = loggerFactory.CreateLogger<GenerationCommander>();
|
||||
var modelFullName = mdClass?.Value ?? options?.Value.ModelFullName;
|
||||
var nameSpace = nameSpaceArg?.Value?? options?.Value.NameSpace;
|
||||
|
|
@ -56,10 +55,10 @@ namespace cli.Commands
|
|||
logger.LogInformation($"Using parameters : modelFullName:{modelFullName} nameSpace:{nameSpace} dbContext:{dbContext} controllerName:{controllerName} relativePath:{relativePath}");
|
||||
|
||||
mvcGenerator.Generate(modelFullName,
|
||||
dbContext,
|
||||
dbContext,
|
||||
controllerName,
|
||||
relativePath);
|
||||
|
||||
|
||||
logger.LogInformation("Finished generation");
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
using cli.Model;
|
||||
using Microsoft.AspNetCore.Hosting;
|
||||
using Microsoft.Extensions.CommandLineUtils;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
|
@ -30,7 +29,7 @@ namespace cli.Commands
|
|||
|
||||
if (!showhelp)
|
||||
{
|
||||
|
||||
|
||||
|
||||
var mailer = Program.AppHost.Services.GetService<MailSender>();
|
||||
var loggerFactory = Program.AppHost.Services.GetService<ILoggerFactory>();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
// See https://aka.ms/new-console-template for more information
|
||||
|
||||
using cli;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
internal class Program
|
||||
|
|
@ -16,7 +15,7 @@ internal class Program
|
|||
.AddJsonFile("appsettings-cli.json", optional: false, reloadOnChange: false)
|
||||
.AddJsonFile($"appsettings-cli.{builder.Environment.EnvironmentName}.json", optional: true, reloadOnChange: false)
|
||||
.AddEnvironmentVariables();
|
||||
|
||||
|
||||
AppHost = builder.Build();
|
||||
AppConfiguration = builder.Configuration;
|
||||
AppHost.Start();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
using Microsoft.AspNetCore.Razor;
|
||||
|
||||
namespace cli
|
||||
namespace cli
|
||||
{
|
||||
public class YaRazorEngineHost
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
namespace cli
|
||||
{
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Runtime.Serialization;
|
||||
using Newtonsoft.Json;
|
||||
using Yavsc;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue