Yes. And not too hard once you get started.
You need to create a derived ConfigurationSection
class to define the <routes>
section (and then add <section>
to the configuration to associate the <routes>
element with your type).
Then you need a type to define each item in the collection and, by default, the default property for your second type for the collection.
After all this is configured, at runtime you will get access to the configuration section:
var myRoutes = ConfigurationManager.GetSection("routes") as RoutesConfigSection;
There are several articles on my blog against this backdrop: http://blog.rjcox.co.uk/category/dev/net-core/
As noted in another answer, MSDN also has coverage (much better than before).
source share