Skip to content

Add public method GetModel to CommandApp #81

Description

@phil-scott-78

Bit of a weird one, I just want a public method on CommandApp that would return ICommandModel. I was trying to access this from outside of the app for documentation generation reasons and it would be quite handy to grab this programmatically at runtime without needing to shell out to grab the XML

  public ICommandModel GetModel()
    {
        // Build the model straight from the configuration, without running the app or
        // injecting the built-in `cli` branch. Also validates, so a misconfigured app
        // throws here just as it would on Run.
        return CommandModelBuilder.Build(_configurator);
    }

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions