dotnet / dotnet/command-line-api

[Question] Default Option value to come from appsettings?

Open
#857 8 comments 0 reactions 0 assignees View on GitHub
question
Dominant language
C#
Stars
3.7k
Forks
428
PR merge metrics
No merged PRs in 30d

Description

Is there a good way to inject IConfiguration into a `Option` object that inherits from the `Option` class via DI? I was providing a default value from an `Environment.GetVariable` but may need to get default values from the `appsettings.json`.

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.