Services
In order to use the built-in common services, call the RegisterCommonServices() extension method of IServiceCollection:
services.RegisterCommonServices();
The ILocalSettingsService service makes it possible to store local application settings in a JSON file. It contains the following methods:
Load()— loads the settings from the specified file and deserializes them into the specified class.Save()— serializes the settings into JSON and saves them to the specified file.
By default, the setting files are stored in the application’s base directory. For desktop and mobile applications running in production environment, they are stored in the local application data directory for the current user and the application name. This base location can be customized using the DataLocationOptions configuration section.