dotnet / dotnet/command-line-api

Questions about undocumented Option.Action vs Command.SetAction

Open
#2,777 6 comments 1 reaction 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

Hello - I am trying to familiarize myself with this library and I noticed Option.Action https://github.com/dotnet/command-line-api/blob/main/src/System.CommandLine/Option.cs#L131 but it is not documented anywhere (as far as I can tell) in the MSDN docs here: https://learn.microsoft.com/en-us/dotnet/standard/commandline/

Is this feature deprecated? If not - are there examples anywhere of how it can/should be used?

I find it confusing when compared to the well documented `Command.SetAction()` examples - are these two action delegate systems at odds or complimentary?

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.