From 8a4f4c1d1f78de1fc0bd85e8118bc4143f528cac Mon Sep 17 00:00:00 2001 From: Volodymyr Osmak Date: Wed, 22 Nov 2017 02:54:44 +0200 Subject: [PATCH] Used ICommandArgument in ApplicationBuilder --- CommandLine/IApplicationBuilder.cs | 3 +-- CommandLine/Internal/ApplicationBuilder.cs | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/CommandLine/IApplicationBuilder.cs b/CommandLine/IApplicationBuilder.cs index 7e401f0..88bc7e1 100644 --- a/CommandLine/IApplicationBuilder.cs +++ b/CommandLine/IApplicationBuilder.cs @@ -1,5 +1,4 @@ using System; -using Microsoft.Extensions.CommandLineUtils; namespace DarkXaHTeP.CommandLine { @@ -7,7 +6,7 @@ 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 configure, bool throwOnUnexpectedArg = true); void OnExecute (Func> invoke); void OnExecute (Func invoke); diff --git a/CommandLine/Internal/ApplicationBuilder.cs b/CommandLine/Internal/ApplicationBuilder.cs index 40baad3..c0239bf 100644 --- a/CommandLine/Internal/ApplicationBuilder.cs +++ b/CommandLine/Internal/ApplicationBuilder.cs @@ -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(