We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 33ef241 commit 9458b33Copy full SHA for 9458b33
README.md
@@ -173,6 +173,21 @@ public sealed class Configuration
173
/// </summary>
174
public string Value { get; set; } = string.Empty; // overriden from config
175
}
176
+
177
+// instead of the default configuration path which is namespace.classname, you can override:
178
+[Configuration("myconfig")]
179
+public sealed class Configuration
180
+{
181
+ /// <summary>
182
+ /// Example value
183
+ /// </summary>
184
+ public string Value { get; set; } = string.Empty; // overriden from config
185
+}
186
187
+// appsettings.json for override:
188
189
+ "myconfig": { Value: "test" }
190
191
```
192
193
You can inject your `Configuration` class into any constructor as normal.
0 commit comments