dotnet / dotnet/command-line-api

Document complex object binding

Open
#651 3 comments 0 reactions 0 assignees View on GitHub
Area-Documentation question
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

I've been creating all of my handlers according to the documentation like this:

```csharp
command.Handler = CommandHandler.Create((IEnumerable include, int count) =>
{
var request = new SchemaRollbackRequest(include, count);

var svc = Container.ResolveService();

svc.RollbackSchema(request);
});
```

and it's a huge pain to update the args for every new option (requires multiple updates).

i just started creating a new command that required more than 7 options and stumbled across #458 where it's discussed to bind to a complex object, which fits my use case perfectly.

can documentation be added around the complex object binding?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.