Go to the documentation of this file.00001 using System.Configuration;
00002
00003 namespace N2.Configuration
00004 {
00008 [ConfigurationCollection(typeof(DefinitionElement))]
00009 public class DefinitionCollection : LazyRemovableCollection<DefinitionElement>
00010 {
00011 protected override void OnDeserializeRemoveElement(DefinitionElement element, System.Xml.XmlReader reader)
00012 {
00013 element.Description = reader.GetAttribute("description");
00014 int sortOrder;
00015 if(int.TryParse(reader.GetAttribute("sortOrder"), out sortOrder))
00016 element.SortOrder = sortOrder;
00017 element.Title = reader.GetAttribute("title");
00018 element.ToolTip = reader.GetAttribute("toolTip");
00019 element.Type = reader.GetAttribute("type");
00020 }
00021 }
00022 }