Skip to content

Commit

Permalink
Used ICommandArgument in ApplicationBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkXaHTeP committed Nov 22, 2017
1 parent 31c1d54 commit 8a4f4c1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions CommandLine/IApplicationBuilder.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
using System;
using Microsoft.Extensions.CommandLineUtils;

namespace DarkXaHTeP.CommandLine
{
public interface IApplicationBuilder
{
IServiceProvider ApplicationServices { get; }
IApplicationBuilder Parent { get; }
CommandArgument Argument(string name, string description, bool multipleValues = false);
ICommandArgument Argument(string name, string description, bool multipleValues = false);
IApplicationBuilder Command (string name, Action<IApplicationBuilder> configure, bool throwOnUnexpectedArg = true);
void OnExecute (Func<System.Threading.Tasks.Task<int>> invoke);
void OnExecute (Func<int> invoke);
Expand Down
4 changes: 2 additions & 2 deletions CommandLine/Internal/ApplicationBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public ApplicationBuilder(IServiceProvider serviceProvider, CommandLineApplicati
public IServiceProvider ApplicationServices { get; }
public IApplicationBuilder Parent { get; }

public CommandArgument Argument(string name, string description, bool multipleValues = false)
public ICommandArgument Argument(string name, string description, bool multipleValues = false)
{
return _commandLineApp.Argument(name, description, multipleValues);
return new CommandLineArgument(_commandLineApp.Argument(name, description, multipleValues));
}

public IApplicationBuilder Command(
Expand Down

0 comments on commit 8a4f4c1

Please sign in to comment.