Castle.MonoRail.Framework.Configuration.ExtensionEntry.Deserialize C# (CSharp) Méthode

Deserialize() public méthode

Deserializes the specified section.
public Deserialize ( XmlNode section ) : void
section System.Xml.XmlNode The section.
Résultat void
		public void Deserialize(XmlNode section)
		{
			XmlAttribute typeAtt = section.Attributes["type"];

			if (typeAtt == null || typeAtt.Value == String.Empty)
			{
				String message = "To add a service, please specify the 'type' attribute. " + 
					"Check the documentation for more information";
				throw new ConfigurationErrorsException(message);
			}
		
			extensionType = TypeLoadUtil.GetType(typeAtt.Value);
			
			extensionNode = section;
		}
		

Usage Example

		/// <summary>
		/// Deserializes the specified section.
		/// </summary>
		/// <param name="section">The section.</param>
		public void Deserialize(XmlNode section)
		{
			XmlNodeList services = section.SelectNodes("extensions/extension");
			
			foreach(XmlNode node in services)
			{
				ExtensionEntry entry = new ExtensionEntry();
				entry.Deserialize(node);
				InnerList.Add(entry);
			}
		}
All Usage Examples Of Castle.MonoRail.Framework.Configuration.ExtensionEntry::Deserialize
ExtensionEntry