Skip to content

Flowing data in System.CommandLine #2162

Open
@KathleenDollard

Description

@KathleenDollard

There are a number within the System.CommandLine flow that could potentially supply information used by later steps. From one perspective this is a core part of the process because a return code (exit code) is returned that we anticipate will be the return value of Main.

#2156 discusses what should be returned from the flow. This the broader question about what state/data should be available during execution.

Several things could supply data that could be used by later steps:

In the old middleware pipeline, closures could be used to stash data between the before/after next step phases, but I do not think there were other ways to share state/data.

Have you ever wished a custom parser could stash some information for use by an action? Any other variation of wanting data to pass between parts of your parser?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions