Class UserSettingsConfiguration
- Namespace
- RDCore.SDK.Server.Configuration
- Assembly
- RDCore.SDK.dll
Adds the settings a user set (UserSettingsStore) to the configuration of a platform application.
public static class UserSettingsConfiguration
- Inheritance
-
UserSettingsConfiguration
- Inherited Members
Methods
AddUserSettings(IConfigurationBuilder, string, SettingsSchema, bool)
Adds the file of the user's settings to a configuration, after the deployed appsettings.json and before what the environment and the command line
say: what a user set takes the place of what the platform was deployed with, and a process that is told otherwise when it is started is told so on purpose.
public static IConfigurationBuilder AddUserSettings(this IConfigurationBuilder builder, string path, SettingsSchema schema, bool reloadOnChange = false)
Parameters
builderIConfigurationBuilderThe configuration.
pathstringThe path of the file (PathIn(IPlatformEnvironment)).
schemaSettingsSchemaThe settings of the application.
reloadOnChangeboolWhether the file is read again when it changes; it is not, unless said otherwise.
Returns
Remarks
A file that is not there is no setting, and neither is one that cannot be read: the platform starts as it was deployed. Of the file, only the values of
settings of schema that a user can set, and that are values the setting can be, are read; whatever else it says is not - a file written
by hand never keeps the platform from starting, and with it the client that could put it back. A setting the schema does not have is read as it is: it is
another application's to check.
A component reads the file when it starts, and not again: what a user set takes effect the next time the component starts (NextStart), unless it is a live setting, which the component's client says while it runs (ILiveSettings).