Appearance
ConfigurationBase Class
Definition
Base class for supporting runtime help output in classes used with CommandLineConfigBuilder. Inherit from this class to enable automatic help screen generation from ConfigOptionAttribute-annotated properties.
- Namespace:
JASE - Assembly:
JASE.dll
Constructors
| Name | Description |
|---|---|
ConfigurationBase() | Initializes internal tracking variables |
Methods
| Name | Description |
|---|---|
T FromJson(string json, EnvironmentMergeMode mode = null) | Create an instance from a JSON string |
T FromJsonFile() | Generate a configuration instance from the JSON file named by JsonFilenameAttribute. |
T FromJsonFile(string filename, EnvironmentMergeMode mode = null, bool performTransforms = null) | Generate a Configuration class from a JSON file |
string GetJsonFilename() | Returns the resolved JSON configuration file path from JsonFilenameAttribute. |
bool Help() | Writes options help screen to console |
void ProcessEnvironmentVariables() | Reads configuration properties from environment variables. |
bool TryGetJsonFilename(out string filename) | Attempts to resolve the JSON configuration file path from JsonFilenameAttribute. |
bool Validate() | Perform basic Validation on the class inheriting from ConfigOptionsBase |
bool Validate(out List<string> errors) | Perform basic Validation on the class inheriting from ConfigOptionsBase, returns a list of errors |