Skip to content

[Feature]: Refactor duplicated command/handler wiring #40

Description

@samatstariongroup

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of the EcoreNetto
  • I have searched open and closed issues to ensure it has not already been reported

Description

  • Summary: Program.CreateCommandChain repeats four near-identical blocks that each create a command, set an action that opens a DI scope, resolves a generator + version checker, builds a handler, and adds the command. Adding a report means copying the block.
  • Affected files: ECoreNetto.Tools/Program.cs:121-179
  • Proposed solution: Extract a generic helper, e.g. AddReportCommand<TCommand, TGenerator>(root, host), that performs the scope/resolve/handler wiring once.
  • Acceptance criteria:
    • The four commands are registered via a shared helper with no copy-pasted scope/resolve logic.
    • CLI behavior is unchanged (existing command tests pass).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions