erminas.SmartAPI.CMS.Project.ContentClasses.Elements.OptionListSelection.GetEntries C# (CSharp) Method

GetEntries() private method

private GetEntries ( XmlElement element ) : ReadOnlyCollection
element System.Xml.XmlElement
return ReadOnlyCollection
        private ReadOnlyCollection<OptionListEntry> GetEntries(XmlElement element)
        {
            return (from XmlElement curEntry in element.GetElementsByTagName("ITEM")
                    select
                        new OptionListEntry
                            {
                                LanguageVariant = Project.LanguageVariants[curEntry.GetAttributeValue("languageid")],
                                Name = curEntry.GetName(),
                                Value = curEntry.InnerText
                            }).ToList().AsReadOnly();
        }