Castle.Windsor.Configuration.Interpreters.XmlInterpreter.DeserializeInstaller C# (CSharp) Method

DeserializeInstaller() private static method

private static DeserializeInstaller ( XmlNode node, IConfigurationStore store ) : void
node System.Xml.XmlNode
store IConfigurationStore
return void
		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);
		}