Program now compiles. Still untested.
This commit is contained in:
@@ -7,24 +7,22 @@ using System.Resources.NetStandard;
|
||||
|
||||
namespace DotNetResxUtils.Commands
|
||||
{
|
||||
internal class GenerationCommand
|
||||
internal class GenerationCommand : Command
|
||||
{
|
||||
const string NAME = "generate";
|
||||
const string DESC = "Generate a .resx file.";
|
||||
|
||||
public GenerationCommand(RootCommand rootCmd)
|
||||
public GenerationCommand() : base(NAME, DESC)
|
||||
{
|
||||
Command cmd = new Command(NAME, DESC);
|
||||
rootCmd.AddCommand(cmd);
|
||||
|
||||
Option<FileInfo?> fromOpt = new Option<FileInfo?>("--from", "Generates a .resx file from the given file.");
|
||||
|
||||
Argument<FileInfo> destArg = new Argument<FileInfo>("destination", "The destination path to store this file. If no extension is given, .resx will automatically be concatenated.");
|
||||
|
||||
cmd.AddOption(fromOpt);
|
||||
cmd.AddArgument(destArg);
|
||||
this.AddOption(fromOpt);
|
||||
this.AddArgument(destArg);
|
||||
|
||||
cmd.SetHandler<FileInfo, FileInfo?>(CommandHandler, destArg, fromOpt);
|
||||
this.SetHandler<FileInfo, FileInfo?>(CommandHandler, destArg, fromOpt);
|
||||
}
|
||||
private async void CommandHandler(FileInfo to, FileInfo? from)
|
||||
{
|
||||
|
Reference in New Issue
Block a user