Class ConfigProperty
- Namespace
- Terminal.Gui.Configuration
- Assembly
- Terminal.Gui.dll
Holds a property's value and the PropertyInfo that allows ConfigurationManager to retrieve and apply the property's value.
public class ConfigProperty
- Inheritance
-
ConfigProperty
- Inherited Members
Remarks
Configuration properties must be public/internal and static and have the ConfigurationPropertyAttribute attribute. If the type of the property requires specialized JSON serialization, a JsonConverter must be provided using the JsonConverterAttribute attribute.
Properties
- HasValue
Gets or sets whether this config property has a value. This is set to true when PropertyValue is set.
- PropertyInfo
Describes the property.
- PropertyValue
Holds the property's value as it was either read from the class's implementation or from a config file. If the property has not been set (e.g. because no configuration file specified a value), HasValue will be false.
Methods
- Apply()
Applies the PropertyValue to the static property described by PropertyInfo.
- UpdateToCurrentValue()
Updates (using reflection) the PropertyValue from the static ConfigurationPropertyAttribute property described in PropertyInfo.