-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Description
Area
Application Services (API, Functions, etc.)
Motivation
All individual command handlers need to be migrated to use the new System.CommandLine 2.0.0-beta5 API patterns. This includes updating option creation, handler method signatures, and command setup patterns across 7 command handler classes.
The new version requires significant changes to:
- Replace
IsRequired = true
withRequired = true
for options - Replace
AddOption()
withOptions.Add()
syntax - Replace
SetHandler()
withSetAction()
method - Update handler signatures to use
ParseResult
parameter - Update
ArgumentHelpName
toHelpName
property
Task Description
Update all individual command handlers to use the new System.CommandLine 2.0.0-beta5 API patterns. This affects 7 command handler classes that need systematic migration.
Command Handlers to Update:
InitProjectCommandHandler.cs
- Basic option handling patternsExtractModelCommandHandler.cs
- Multiple option handlingDataDictionaryCommandHandler.cs
- Complex subcommand structureEnrichModelCommandHandler.cs
- Standard option patternsExportModelCommandHandler.cs
- File type option handlingQueryModelCommandHandler.cs
- Simple command patternShowObjectCommandHandler.cs
- Standard option patterns
Common Changes Required for Each Handler:
- Replace
IsRequired = true
withRequired = true
for options - Replace
AddOption()
withOptions.Add()
syntax - Replace
AddCommand()
withSubcommands.Add()
for subcommands - Replace
SetHandler()
withSetAction()
method - Update handler method signatures to use
ParseResult
parameter - Use
parseResult.GetValue<T>(option)
to get option values - Update
ArgumentHelpName
toHelpName
property - Ensure async handlers include
CancellationToken
parameter
Acceptance Criteria
- All 7 command handlers compile without errors
- Option creation uses new constructor patterns and property setters
- Handler methods use
ParseResult
parameter correctly - All commands execute successfully with test parameters
- Help output displays correctly for all commands
- Error handling and validation continue to work
- Subcommands (DataDictionaryCommandHandler) work correctly
- No regression in command-line functionality
Impact / Risk
- Dependencies: Requires completion of issues [Chore]: Update System.CommandLine package reference to 2.0.0-beta5 #15, [Chore]: Migrate Program.cs to System.CommandLine 2.0.0-beta5 API #16, and [Chore]: Update CommandHandler base class for System.CommandLine 2.0.0-beta5 #17 first
- Risk Level: High - Affects all CLI functionality
- Breaking Changes: Internal only - external CLI interface should remain the same
- Testing: Requires comprehensive testing of all CLI commands
- File Count: 7 files need modification
Related Issues:
- Depends on [Chore]: Update System.CommandLine package reference to 2.0.0-beta5 #15 (Update System.CommandLine package reference)
- Depends on [Chore]: Migrate Program.cs to System.CommandLine 2.0.0-beta5 API #16 (Migrate Program.cs to new API)
- Depends on [Chore]: Update CommandHandler base class for System.CommandLine 2.0.0-beta5 #17 (Update CommandHandler base class)
- Part of the larger System.CommandLine upgrade effort as outlined in plan-upgrade-system-commandline-beta5.md
Copilot