nspectre defines an IConfigurationReader interface for reading configuration settings into the Settings class used by nspectre. Currently, there are two implementations of this interface: XmlConfigurationReader - which reads configuration settings from an XmlDocument - and EmbeddedXmlConfigurationReader - which reads configuration settings from an xml file embedded as a resource in a .NET assembly. The Settings class can also be used directly to set configuration programmatically.
There are three main elements to configuration: Templates, Assemblies and CandidateTypes.
Templates lists the templates used in the configuration. Each template has a name and a definition.
Assemblies lists the assemblies to which references are required for the specifications defined in the configuration. nspectre will automatically add a reference to the assembly defining each CandidateType.
CandidateTypes is a list of the types to be validated. Each CandidateType contains an ActionCollection, which is a list of the Actions defined for the CandidateType.