Reputation: 3314
I'm using a CloudConfigurationManager to access runtime settings. But, the interface is terrible! There is just 1 static GetSetting() method. I'm guessing this is because the underlying logic is just lazily searching a variety of locations for the key at runtime.
What I would like to do is iterate over all possible keys. The more basic ConfigurationManager class accomplishes this via a method AppSettings().
I figure this might /not/ be possible via CloudConfigurationManager, but I wonder if there is a way to access the schema file (the .csdef) in some programmatic way (i.e. strongly typed manner). I would prefer not to access it as raw XML. Any suggestions?
Upvotes: 0
Views: 137
Reputation: 136356
but I wonder if there is a way to access the schema file (the .csdef) in some programmatic way (i.e. strongly typed manner).
From what I understand, this is by design. You're not supposed to access it programmatically. From https://msdn.microsoft.com/en-us/library/azure/ee758711.aspx:
The service definition file defines the service model for an application.
The way I understand this is essentially csdef
file is the model you configure and tell Azure Fabric Controller
how your resources should be deployed and configured e.g. Size of VM, should you require IIS, what certificates to install, firewall ports to open etc. Azure Fabric Controller takes this information and stands up the environment for you.
This is the reason why csdef
file is bundled with the package and not kept as a separate file like cscfg
file.
Upvotes: 1