As far as what I understand:
- WorkerService is the new way to define a Windows Service (app that run as as service).
- By default, using the contextual menu on the project, the type of configuration file associated to a WorkerService is stil a xaml file: "App.config". See: How to: Add an application configuration file to a C# project
- According to Microsoft documentation, I understand that I should use the section
<appsettings>
.
appSettings is a dictionary of key value pair. But I can't find how to add a list of item as the value. Also, I would like to add my own object as the value if possible.
Is there a way to add a List of MyConfigObject (List<MyConfigObject>
)into a config file? If yes, how? Should I use another section or should I use another type of config file (json, yaml) to have the simplest way to read/write settings?