From 35568ab8234ba302d351a470c9f2dc6fa6fe69db Mon Sep 17 00:00:00 2001 From: Jay Turpin Date: Wed, 13 Jan 2021 10:28:33 -0700 Subject: [PATCH] Updated Commands with with new Execute() method signature --- docs/input/cli/introduction.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/docs/input/cli/introduction.md b/docs/input/cli/introduction.md index a38f04d..cf16bf6 100644 --- a/docs/input/cli/introduction.md +++ b/docs/input/cli/introduction.md @@ -58,17 +58,19 @@ in the previous step. ```csharp public class AddPackageCommand : Command { - public override int Execute(AddPackageSettings settings, ILookup remaining) + public override int Execute(CommandContext context, AddPackageSettings settings) { // Omitted + return 0; } } public class AddReferenceCommand : Command { - public override int Execute(AddReferenceSettings settings, ILookup remaining) + public override int Execute(CommandContext context, AddReferenceSettings settings) { // Omitted + return 0; } } ``` @@ -114,4 +116,4 @@ This make the resulting code very clean and easy to navigate, not to mention to And most importantly at all, the type system guides me to do the right thing. I can't configure commands in non-compatible ways, and if I want to add a new top-level `add-package` command (or move the command completely), it's just a single line to change. This makes it easy to -experiment and makes the CLI experience a first class citizen of your application. \ No newline at end of file +experiment and makes the CLI experience a first class citizen of your application.