From 781f5aeb8f8c123804d4b22c8da99db7ba20204e Mon Sep 17 00:00:00 2001 From: Kyle Burrows Date: Wed, 21 Jan 2026 18:40:31 -0500 Subject: [PATCH] cleanup --- .../MinimalCommandLineBuilder.cs | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/src/MinimalCli.Core/MinimalCommandLineBuilder.cs b/src/MinimalCli.Core/MinimalCommandLineBuilder.cs index a68480c..5b38b74 100644 --- a/src/MinimalCli.Core/MinimalCommandLineBuilder.cs +++ b/src/MinimalCli.Core/MinimalCommandLineBuilder.cs @@ -71,52 +71,17 @@ public MinimalCommandLineApp Build() { this.RootCommand = new(); } - // NOTES: going to have to create a factory to get the correct instance of the CommandOptions - // for the command that was invoked, inside the Handler(serivces) function, can call - // var factory = services.GetRequiredService(); - // var options = factory.GetOptionsFor(); - // then we can execute the function how it was meant to be ran foreach (CommandOptions commandOptions in commandOptionsCollection) { // first call this function to setup all the parameter bindings ParameterBinding[] bindings = commandOptions.SetupCommandParameterBindings(); - //foreach (ParameterBinding p in bindings) - //{ - // if(p is ArgumentBinding arg) - // Console.WriteLine(" Argument: {0} ({1})", arg.Argument.Name, arg.ParameterType); - // else if(p is OptionBinding opt) - // Console.WriteLine(" Option: {0} {1}", opt.Option.Name, opt.ParameterName); - //} - // TODO: do a verification of commands to make sure they aren't in a bad configuration - // Add command, at this point the action should already be set? this.RootCommand.Subcommands.Add(commandOptions.Command); // add options to a dictionary by the command name cmdBindingFactory.AddCommandOptions(commandOptions.Command.Name, commandOptions); - - - - //Console.WriteLine("Command: {0}", commandOptions.Command.Name); - //foreach (var arg in commandOptions.Command.Arguments) - // Console.WriteLine(" *Argument: {0} ({1})", arg.Name, arg.ValueType.FullName); - //foreach (var opt in commandOptions.Command.Options) - // Console.WriteLine(" *Option: {0} ({1})", opt.Name, opt.ValueType.FullName); - - //List bindings = commandOptions.GetCommandParameterBindings(); - //foreach(ParameterBinding binding in bindings) - //{ - // if (binding is ArgumentBinding arg) - // commandOptions.Command.Add(arg.Argument); - // else if (binding is OptionBinding opt) - // commandOptions.Command.Add(opt.Option); - // else if(binding is DependencyInjectionBinding dep) - // { - // // ...? - // } - //} } if (this.RootCommand is null)