|
|
@ -68,8 +68,19 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc |
|
|
var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long); |
|
|
var source = commandLineArgs.Options.GetOrNull(Options.Source.Short, Options.Source.Long); |
|
|
var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory(); |
|
|
var workDirectory = commandLineArgs.Options.GetOrNull(Options.WorkDirectory.Short, Options.WorkDirectory.Long) ?? Directory.GetCurrentDirectory(); |
|
|
var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long); |
|
|
var folder = commandLineArgs.Options.GetOrNull(Options.Folder.Long); |
|
|
|
|
|
var serviceTypeArg = commandLineArgs.Options.GetOrNull(Options.Module.Short, Options.ServiceType.Long); |
|
|
|
|
|
|
|
|
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, commandLineArgs.Options); |
|
|
ServiceType? serviceType = null; |
|
|
|
|
|
if (!serviceTypeArg.IsNullOrWhiteSpace()) |
|
|
|
|
|
{ |
|
|
|
|
|
serviceType = serviceTypeArg.ToLower() == "application" |
|
|
|
|
|
? ServiceType.Application |
|
|
|
|
|
: serviceTypeArg.ToLower() == "integration" |
|
|
|
|
|
? ServiceType.Integration |
|
|
|
|
|
: null; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return new GenerateProxyArgs(CommandName, workDirectory, module, url, output, target, apiName, source, folder, serviceType, commandLineArgs.Options); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public virtual string GetUsageInfo() |
|
|
public virtual string GetUsageInfo() |
|
|
@ -162,5 +173,11 @@ public abstract class ProxyCommandBase<T> : IConsoleCommand, ITransientDependenc |
|
|
public const string Short = "wd"; |
|
|
public const string Short = "wd"; |
|
|
public const string Long = "working-directory"; |
|
|
public const string Long = "working-directory"; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static class ServiceType |
|
|
|
|
|
{ |
|
|
|
|
|
public const string Short = "st"; |
|
|
|
|
|
public const string Long = "service-type"; |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|