OverlayConfigAttribute constructor (1 of 2)
Creates an instance of the attribute for a configuration key.
public OverlayConfigAttribute(string key)
| parameter |
description |
| key |
The full configuration key to overlay, e.g. "Localization:BaseLanguage". |
See Also
OverlayConfigAttribute constructor (2 of 2)
Creates an instance of the attribute for a property of an options class, e.g. [OverlayConfig(typeof(LocalizationSettings), nameof(LocalizationSettings.BaseLanguage))]. The key is the section key of the DefaultSectionKeyAttribute of the class and the property name.
public OverlayConfigAttribute(Type optionsType, string propertyName)
| parameter |
description |
| optionsType |
The options class, which must have a DefaultSectionKeyAttribute. |
| propertyName |
The name of the property of the options class. |
Exceptions
| exception |
condition |
| ArgumentException |
The class has no default section key, or no such property. |
See Also