private static void DeserializeInstaller(XmlNode node, IConfigurationStore store)
{
var config = XmlConfigurationDeserializer.GetDeserializedNode(node);
var type = config.Attributes["type"];
var assembly = config.Attributes["assembly"];
var directory = config.Attributes["directory"];
var attributesCount = 0;
if ((string.IsNullOrEmpty(type)) == false)
{
attributesCount++;
}
if (string.IsNullOrEmpty(assembly) == false)
{
attributesCount++;
}
if (string.IsNullOrEmpty(directory) == false)
{
attributesCount++;
}
if (attributesCount != 1)
{
throw new Exception(
"install must have exactly one of the following attributes defined: 'type', 'assembly' or 'directory'.");
}
AddInstallerConfig(config, store);
}