Thanks to visit codestin.com
Credit goes to github.com

Skip to content

CommandLine & Json Config #36542

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
tai-yi opened this issue May 3, 2018 · 5 comments
Closed

CommandLine & Json Config #36542

tai-yi opened this issue May 3, 2018 · 5 comments
Labels
area-Extensions-Configuration backlog-cleanup-candidate An inactive issue that has been marked for automated closure. feature-request no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.

Comments

@tai-yi
Copy link

tai-yi commented May 3, 2018

How can I use command line arguments override JSON array config section?
I tried as below, but it doesn't work well.

JSON
{ "names": ["a","b","c","d"] }
Command args
app.exe -names d,e,f

Code configuration["names"] can get right value from command args.
Code configuration['names'].GetChildren().Select(p=>p.Value) returns "a","b","c","d"

Could anyone help me?

@los93sol
Copy link

having the same issue here, from what I've seen so far if you do -names[0] d -names[1] e -names[2] f then it will work but that's a pretty terrible experience and doesn't work at all for my use case since I need to use switchmappings for this as well

@ajcvickers ajcvickers transferred this issue from aspnet/Configuration Dec 15, 2018
@ajcvickers
Copy link
Contributor

I don't believe that this is something that is possible right now. Adding to the backlog to consider later.

@analogrelay
Copy link
Contributor

This is part of a broader category of issues related to array representation in Config. It's not likely to be something we can change significantly without a major redesign. Transferring to the appropriate repo and putting in the Future milestone though.

@analogrelay analogrelay transferred this issue from dotnet/extensions May 15, 2020
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-Extensions-Configuration untriaged New issue has not been triaged by the area owner labels May 15, 2020
@analogrelay analogrelay added this to the Future milestone May 15, 2020
@maryamariyan maryamariyan removed the untriaged New issue has not been triaged by the area owner label Jul 1, 2020
@maryamariyan maryamariyan added question Answer questions and provide assistance, not an issue with source code or documentation. feature-request labels Oct 20, 2020
Copy link
Contributor

Due to lack of recent activity, this issue has been marked as a candidate for backlog cleanup. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will undo this process.

This process is part of our issue cleanup automation.

@dotnet-policy-service dotnet-policy-service bot added backlog-cleanup-candidate An inactive issue that has been marked for automated closure. no-recent-activity labels Apr 22, 2025
Copy link
Contributor

This issue will now be closed since it had been marked no-recent-activity but received no further activity in the past 14 days. It is still possible to reopen or comment on the issue, but please note that the issue will be locked if it remains inactive for another 30 days.

@dotnet-policy-service dotnet-policy-service bot removed this from the Future milestone May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Extensions-Configuration backlog-cleanup-candidate An inactive issue that has been marked for automated closure. feature-request no-recent-activity question Answer questions and provide assistance, not an issue with source code or documentation.
Projects
None yet
Development

No branches or pull requests

6 participants